summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/it913x-fe.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-08-14 07:51:20 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-15 23:47:10 +0200
commit5359805193dc83e1aab2f8e230d57c649363c5c5 (patch)
treeeaecebf44e6a9f64e6a96b7b6519fac289a3c4b6 /drivers/media/dvb-frontends/it913x-fe.c
parent[media] V4L: soc-camera: add selection API host operations (diff)
downloadlinux-5359805193dc83e1aab2f8e230d57c649363c5c5.tar.xz
linux-5359805193dc83e1aab2f8e230d57c649363c5c5.zip
[media] it913x-fe: use ARRAY_SIZE() as a cleanup
This code looks suspicious, but it turns out that "nv" is an array of u8 so sizeof() is the same as ARRAY_SIZE(). Using ARRAY_SIZE() is more readable though. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends/it913x-fe.c')
-rw-r--r--drivers/media/dvb-frontends/it913x-fe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/it913x-fe.c b/drivers/media/dvb-frontends/it913x-fe.c
index 708cbf197913..6e1c6eb340b7 100644
--- a/drivers/media/dvb-frontends/it913x-fe.c
+++ b/drivers/media/dvb-frontends/it913x-fe.c
@@ -199,7 +199,7 @@ static int it913x_init_tuner(struct it913x_fe_state *state)
if (reg < 0)
return -ENODEV;
- else if (reg < sizeof(nv))
+ else if (reg < ARRAY_SIZE(nv))
nv_val = nv[reg];
else
nv_val = 2;