diff options
author | Joe Perches <joe@perches.com> | 2010-12-21 13:16:09 +0300 |
---|---|---|
committer | Joe Perches <joe@perches.com> | 2010-12-21 13:16:09 +0300 |
commit | 75a84eb5d144dc761e1bb0f7dcacbf2b5cee562c (patch) | |
tree | 53286209c0c3e31ca0a1aabedd39e94ff6cdf816 /drivers/net/tulip | |
parent | 5591c75dc345d93d353d2ab2962824648a73efe4 (diff) | |
download | linux-75a84eb5d144dc761e1bb0f7dcacbf2b5cee562c.tar.xz |
tulip: Use DEFINE_PCI_DEVICE_TABLE and static const
Moves the PCI table to the right read-only section.
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r-- | drivers/net/tulip/tulip_core.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 2c39f2591216..5c01e260f1ba 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c @@ -1302,17 +1302,18 @@ static const struct net_device_ops tulip_netdev_ops = { #endif }; +DEFINE_PCI_DEVICE_TABLE(early_486_chipsets) = { + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424) }, + { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496) }, + { }, +}; + static int __devinit tulip_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) { struct tulip_private *tp; /* See note below on the multiport cards. */ static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u', 'x'}; - static struct pci_device_id early_486_chipsets[] = { - { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424) }, - { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496) }, - { }, - }; static int last_irq; static int multiport_cnt; /* For four-port boards w/one EEPROM */ int i, irq; @@ -1682,7 +1683,9 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, tp->full_duplex_lock = 1; if (tulip_media_cap[tp->default_port] & MediaIsMII) { - u16 media2advert[] = { 0x20, 0x40, 0x03e0, 0x60, 0x80, 0x100, 0x200 }; + static const u16 media2advert[] = { + 0x20, 0x40, 0x03e0, 0x60, 0x80, 0x100, 0x200 + }; tp->mii_advertise = media2advert[tp->default_port - 9]; tp->mii_advertise |= (tp->flags & HAS_8023X); /* Matching bits! */ } |