git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[pandora-kernel.git]
/
drivers
/
i2c
/
busses
/
i2c-parport.c
diff --git
a/drivers/i2c/busses/i2c-parport.c
b/drivers/i2c/busses/i2c-parport.c
index
7e2e8cd
..
48a8294
100644
(file)
--- a/
drivers/i2c/busses/i2c-parport.c
+++ b/
drivers/i2c/busses/i2c-parport.c
@@
-138,7
+138,6
@@
static struct i2c_algo_bit_data parport_algo_data = {
.getsda = parport_getsda,
.getscl = parport_getscl,
.udelay = 60,
.getsda = parport_getsda,
.getscl = parport_getscl,
.udelay = 60,
- .mdelay = 60,
.timeout = HZ,
};
.timeout = HZ,
};
@@
-241,9
+240,14
@@
static struct parport_driver i2c_parport_driver = {
static int __init i2c_parport_init(void)
{
static int __init i2c_parport_init(void)
{
- if (type < 0 || type >= ARRAY_SIZE(adapter_parm)) {
+ if (type < 0) {
+ printk(KERN_WARNING "i2c-parport: adapter type unspecified\n");
+ return -ENODEV;
+ }
+
+ if (type >= ARRAY_SIZE(adapter_parm)) {
printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type);
printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type);
-
type = 0
;
+
return -ENODEV
;
}
return parport_register_driver(&i2c_parport_driver);
}
return parport_register_driver(&i2c_parport_driver);