From e2a6cba6516fcfe2c4f3ff73d0f9aa0ba261f548 Mon Sep 17 00:00:00 2001 From: pfg Date: Tue, 19 Apr 2016 23:37:24 +0000 Subject: sys/dev: use our nitems() macro when it is avaliable through param.h. No functional change, only trivial cases are done in this sweep, Drivers that can get further enhancements will be done independently. Discussed in: freebsd-current --- sys/dev/bktr/bktr_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/dev/bktr') diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c index 764eda5..67f3ab1 100644 --- a/sys/dev/bktr/bktr_core.c +++ b/sys/dev/bktr/bktr_core.c @@ -324,7 +324,7 @@ static struct meteor_pixfmt_internal { { { 0, METEOR_PIXTYPE_YUV_12, 2, { 0xff0000,0x00ff00,0x0000ff }, 1,1 }, 0x88 }, }; -#define PIXFMT_TABLE_SIZE ( sizeof(pixfmt_table) / sizeof(pixfmt_table[0]) ) +#define PIXFMT_TABLE_SIZE nitems(pixfmt_table) /* * Table of Meteor-supported Pixel Formats (for SETGEO compatibility) @@ -354,8 +354,7 @@ static struct { }, }; -#define METEOR_PIXFMT_TABLE_SIZE ( sizeof(meteor_pixfmt_table) / \ - sizeof(meteor_pixfmt_table[0]) ) +#define METEOR_PIXFMT_TABLE_SIZE nitems(meteor_pixfmt_table) #define BSWAP (BT848_COLOR_CTL_BSWAP_ODD | BT848_COLOR_CTL_BSWAP_EVEN) -- cgit v1.1