diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 14:17:05 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 14:17:05 -0500 |
commit | 70c07e02625ec46d0ffbfce1acef42d660803528 (patch) | |
tree | f500f1a4f93e72747fb08b0eefabb167dcdc5db9 /drivers/i2c/busses/i2c-parport.c | |
parent | 5d1769ac3d0ea5ff3a286b097c21faaf6a9e6859 (diff) | |
parent | 2746b8623abce815aaae7afc946b1b39f8436f5a (diff) |
Merge branch 'viro'
Diffstat (limited to 'drivers/i2c/busses/i2c-parport.c')
-rw-r--r-- | drivers/i2c/busses/i2c-parport.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index 2854d858fc9b..7e2e8cd1c14a 100644 --- a/drivers/i2c/busses/i2c-parport.c +++ b/drivers/i2c/busses/i2c-parport.c | |||
@@ -241,14 +241,11 @@ static struct parport_driver i2c_parport_driver = { | |||
241 | 241 | ||
242 | static int __init i2c_parport_init(void) | 242 | static int __init i2c_parport_init(void) |
243 | { | 243 | { |
244 | int type_count; | 244 | if (type < 0 || type >= ARRAY_SIZE(adapter_parm)) { |
245 | |||
246 | type_count = sizeof(adapter_parm)/sizeof(struct adapter_parm); | ||
247 | if (type < 0 || type >= type_count) { | ||
248 | printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type); | 245 | printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type); |
249 | type = 0; | 246 | type = 0; |
250 | } | 247 | } |
251 | 248 | ||
252 | return parport_register_driver(&i2c_parport_driver); | 249 | return parport_register_driver(&i2c_parport_driver); |
253 | } | 250 | } |
254 | 251 | ||