From eca8ebfc11d1935a7dd4c59cb8defb5bdff44ecd Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" Date: Sat, 20 Jan 2007 00:35:03 -0300 Subject: V4L/DVB (5090): Pvrusb2: A patch to use ARRAY_SIZE macro when appropriate Signed-off-by: Ahmed S. Darwish Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/media/video/pvrusb2/pvrusb2-i2c-core.c') diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c index 1a850792667..a28299107be 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c @@ -976,8 +976,7 @@ static void do_i2c_scan(struct pvr2_hdw *hdw) printk("%s: i2c scan beginning\n",hdw->name); for (i = 0; i < 128; i++) { msg[0].addr = i; - rc = i2c_transfer(&hdw->i2c_adap,msg, - sizeof(msg)/sizeof(msg[0])); + rc = i2c_transfer(&hdw->i2c_adap,msg, ARRAY_SIZE(msg)); if (rc != 1) continue; printk("%s: i2c scan: found device @ 0x%x\n",hdw->name,i); } -- cgit v1.2.3