[media] pvrusb2: delete generic_standards_cnt
authorDan Carpenter <error27@gmail.com>
Sat, 26 Mar 2011 01:54:34 +0000 (22:54 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 20 May 2011 12:28:25 +0000 (09:28 -0300)
The generic_standards_cnt define is only used in one place and it's
more readable to just call ARRAY_SIZE(generic_standards) directly.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/pvrusb2/pvrusb2-std.c

index 35c8b4059827575f3b054b920a037d1fa5fedd17..453627b07833025bdbf5f3b281a688ee8c3b2300 100644 (file)
@@ -278,12 +278,10 @@ static struct v4l2_standard generic_standards[] = {
        }
 };
 
-#define generic_standards_cnt ARRAY_SIZE(generic_standards)
-
 static struct v4l2_standard *match_std(v4l2_std_id id)
 {
        unsigned int idx;
-       for (idx = 0; idx < generic_standards_cnt; idx++) {
+       for (idx = 0; idx < ARRAY_SIZE(generic_standards); idx++) {
                if (generic_standards[idx].id & id) {
                        return generic_standards + idx;
                }