diff options
author | Paul Irofti <pirofti@cvs.openbsd.org> | 2010-07-02 00:09:38 +0000 |
---|---|---|
committer | Paul Irofti <pirofti@cvs.openbsd.org> | 2010-07-02 00:09:38 +0000 |
commit | 06d20a21e217ba865f31d7a9971c3565efab833a (patch) | |
tree | ab8c9f362af56b83e42df613040f6477fa542a8a /sys/dev/pci | |
parent | 49d47f6028ac2f9793e00d7d432bd1d138071dc2 (diff) |
Switch to nitems for the table, save some space. `Looks good' deraadt@.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/vga_pci.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index bdbc0575e06..e07213945c6 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_pci.c,v 1.51 2010/07/01 23:38:29 mlarkin Exp $ */ +/* $OpenBSD: vga_pci.c,v 1.52 2010/07/02 00:09:37 pirofti Exp $ */ /* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */ /* @@ -170,11 +170,6 @@ static const struct vga_device_description vga_devs[] = { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ARRANDALE_IGD, 0x17aa, 0x215a }, { 0xffff, 0xffff, 0xffff, 0xffff }, 1, 0 - }, - { - /* NULL */ - { 0, 0, 0, 0 }, - { 0, 0, 0, 0 }, 0, 0 } }; #endif @@ -252,8 +247,7 @@ vga_pci_attach(struct device *parent, struct device *self, void *aux) subvend = PCI_VENDOR(subid); subprod = PCI_PRODUCT(subid); - for (i = 0; vga_devs[i].rval[0] && vga_devs[i].rval[1] && - vga_devs[i].rval[2] && vga_devs[i].rval[3]; i++) + for (i = 0; i < nitems(vga_devs); i++) if ((vend & vga_devs[i].rmask[0]) == vga_devs[i].rval[0] && (prod & vga_devs[i].rmask[1]) == vga_devs[i].rval[1] && (subvend & vga_devs[i].rmask[2]) == vga_devs[i].rval[2] && |