summaryrefslogtreecommitdiffstats
path: root/sys/dev/bktr
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-19 23:37:24 +0000
committerpfg <pfg@FreeBSD.org>2016-04-19 23:37:24 +0000
commite2a6cba6516fcfe2c4f3ff73d0f9aa0ba261f548 (patch)
tree346d2ff1b645f831d2f412a7a4be3f6eb1c711b4 /sys/dev/bktr
parentea58c6f194dc25f7e2e87f7a36de9b2da5b8b90c (diff)
downloadFreeBSD-src-e2a6cba6516fcfe2c4f3ff73d0f9aa0ba261f548.zip
FreeBSD-src-e2a6cba6516fcfe2c4f3ff73d0f9aa0ba261f548.tar.gz
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
Diffstat (limited to 'sys/dev/bktr')
-rw-r--r--sys/dev/bktr/bktr_core.c5
1 files changed, 2 insertions, 3 deletions
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)
OpenPOWER on IntegriCloud