Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] pvrusb2: delete generic_standards_cnt

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>

authored by

Dan Carpenter and committed by
Mauro Carvalho Chehab
92f6ed71 0cff5937

+1 -3
+1 -3
drivers/media/video/pvrusb2/pvrusb2-std.c
··· 278 278 } 279 279 }; 280 280 281 - #define generic_standards_cnt ARRAY_SIZE(generic_standards) 282 - 283 281 static struct v4l2_standard *match_std(v4l2_std_id id) 284 282 { 285 283 unsigned int idx; 286 - for (idx = 0; idx < generic_standards_cnt; idx++) { 284 + for (idx = 0; idx < ARRAY_SIZE(generic_standards); idx++) { 287 285 if (generic_standards[idx].id & id) { 288 286 return generic_standards + idx; 289 287 }