X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fi2c%2Fbusses%2Fi2c-parport.c;h=7e2e8cd1c14a90d0806d382df0e9b726e34768b2;hb=7e3d7db52469f6bcfbfd2d3d00dd17da573facd9;hp=2854d858fc9b1194dc19deca52b5433eae4ea7c8;hpb=8104a9a9c9ad8c849d931c46ef6841b23d1fc729;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index 2854d85..7e2e8cd 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); }