diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 06:58:59 +0100 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 06:58:59 +0100 |
commit | cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (patch) | |
tree | 73cd85e5529a01fa2338ab6d58b99c36dd666cbe /drivers/i2c/busses/i2c-parport-light.c | |
parent | [libata sata_mv] do not enable PCI MSI by default (diff) | |
parent | Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/... (diff) | |
download | linux-cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa.tar.xz linux-cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa.zip |
Merge branch 'master'
Diffstat (limited to 'drivers/i2c/busses/i2c-parport-light.c')
-rw-r--r-- | drivers/i2c/busses/i2c-parport-light.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-parport-light.c b/drivers/i2c/busses/i2c-parport-light.c index 3e5eba9fcacb..c63025a4c861 100644 --- a/drivers/i2c/busses/i2c-parport-light.c +++ b/drivers/i2c/busses/i2c-parport-light.c @@ -121,14 +121,11 @@ static struct i2c_adapter parport_adapter = { 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; } - + if (base == 0) { printk(KERN_INFO "i2c-parport: using default base 0x%x\n", DEFAULT_BASE); base = DEFAULT_BASE; @@ -152,7 +149,7 @@ static int __init i2c_parport_init(void) release_region(base, 3); return -ENODEV; } - + return 0; } |