diff options
author | marius <marius@FreeBSD.org> | 2012-06-02 19:41:28 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2012-06-02 19:41:28 +0000 |
commit | 5ef7d2624d9addd62e306a8cbcccfe078c717c31 (patch) | |
tree | aaa525edc723998cd6992bf4bf5708fc84192682 /sys/dev/sym | |
parent | 3c3d727c68a1120d1726c88e607e639e1e6d880a (diff) | |
download | FreeBSD-src-5ef7d2624d9addd62e306a8cbcccfe078c717c31.zip FreeBSD-src-5ef7d2624d9addd62e306a8cbcccfe078c717c31.tar.gz |
Take advantage of nitems().
MFC after: 3 days
Diffstat (limited to 'sys/dev/sym')
-rw-r--r-- | sys/dev/sym/sym_hipd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index bfe1e69..9f2fb2a 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -8411,9 +8411,6 @@ static const struct sym_pci_chip sym_pci_dev_table[] = { FE_RAM|FE_IO256|FE_LEDC} }; -#define sym_pci_num_devs \ - (sizeof(sym_pci_dev_table) / sizeof(sym_pci_dev_table[0])) - /* * Look up the chip table. * @@ -8434,7 +8431,7 @@ sym_find_pci_chip(device_t dev) device_id = pci_get_device(dev); revision = pci_get_revid(dev); - for (i = 0; i < sym_pci_num_devs; i++) { + for (i = 0; i < nitems(sym_pci_dev_table); i++) { chip = &sym_pci_dev_table[i]; if (device_id != chip->device_id) continue; |