Skip to content

Commit

Permalink
[media] pvrusb2: delete generic_standards_cnt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent 0cff593 commit 92f6ed7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/media/video/pvrusb2/pvrusb2-std.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 92f6ed7

Please sign in to comment.