diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 00:59:34 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 00:59:34 -0500 |
commit | 725b2805fd5d729b0db59fe8fc992e97523782c7 (patch) | |
tree | 04ca7c7ed6e918029898a6c5301488e60d0564d4 /drivers/i2c/busses/i2c-parport.c | |
parent | 9ac341ae799413708e674bc65c8a72c90dae8d34 (diff) | |
parent | cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (diff) | |
download | blackbird-op-linux-725b2805fd5d729b0db59fe8fc992e97523782c7.tar.gz blackbird-op-linux-725b2805fd5d729b0db59fe8fc992e97523782c7.zip |
Merge branch 'upstream-fixes'
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 = { static int __init i2c_parport_init(void) { - int type_count; - - type_count = sizeof(adapter_parm)/sizeof(struct adapter_parm); - if (type < 0 || type >= type_count) { + if (type < 0 || type >= ARRAY_SIZE(adapter_parm)) { printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type); type = 0; } - + return parport_register_driver(&i2c_parport_driver); } |