Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+9 -6
+9 -6
drivers/net/tulip/tulip_core.c
··· 1302 1302 #endif 1303 1303 }; 1304 1304 1305 + DEFINE_PCI_DEVICE_TABLE(early_486_chipsets) = { 1306 + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424) }, 1307 + { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496) }, 1308 + { }, 1309 + }; 1310 + 1305 1311 static int __devinit tulip_init_one (struct pci_dev *pdev, 1306 1312 const struct pci_device_id *ent) 1307 1313 { 1308 1314 struct tulip_private *tp; 1309 1315 /* See note below on the multiport cards. */ 1310 1316 static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u', 'x'}; 1311 - static struct pci_device_id early_486_chipsets[] = { 1312 - { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424) }, 1313 - { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496) }, 1314 - { }, 1315 - }; 1316 1317 static int last_irq; 1317 1318 static int multiport_cnt; /* For four-port boards w/one EEPROM */ 1318 1319 int i, irq; ··· 1683 1682 tp->full_duplex_lock = 1; 1684 1683 1685 1684 if (tulip_media_cap[tp->default_port] & MediaIsMII) { 1686 - u16 media2advert[] = { 0x20, 0x40, 0x03e0, 0x60, 0x80, 0x100, 0x200 }; 1685 + static const u16 media2advert[] = { 1686 + 0x20, 0x40, 0x03e0, 0x60, 0x80, 0x100, 0x200 1687 + }; 1687 1688 tp->mii_advertise = media2advert[tp->default_port - 9]; 1688 1689 tp->mii_advertise |= (tp->flags & HAS_8023X); /* Matching bits! */ 1689 1690 }