Skip to contentSkip to conversation

block: make PCI device id constant

PATCH Alexey Dobriyan 2 participants 2 messages Jan 10, 2010 Block layer

lore
Share & tools
lore

Alexey Dobriyan

author NAK
#0 lore raw

Review

Quoted 2 lines
(quoted diff) +1 -1
-static struct pci_device_id DAC960_id_table[] = {
+static const struct pci_device_id DAC960_id_table[] = {

NAK, we have DEFINE_PCI_DEVICE_TABLE()

#1 lore raw

From: Márton Németh <[email protected]>

Use DEFINE_PCI_DEVICE_TABLE() when declaring the PCI device table as suggested in Documentation/PCI/pci.txt .

---

block/DAC960.c renamed from block/DAC960.c.orig +1 -1
@@ -7134,7 +7134,7 @@
 	.MemoryWindowSize =	DAC960_PD_RegisterWindowSize,
 };
 
-static struct pci_device_id DAC960_id_table[] = {
+static DEFINE_PCI_DEVICE_TABLE(DAC960_id_table) = {
 	{
 		.vendor 	= PCI_VENDOR_ID_MYLEX,
 		.device		= PCI_DEVICE_ID_MYLEX_DAC960_GEM,
block/sx8.c renamed from block/sx8.c.orig +1 -1
@@ -409,7 +409,7 @@
 static void carm_remove_one (struct pci_dev *pdev);
 static int carm_bdev_getgeo(struct block_device *bdev, struct hd_geometry *geo);
 
-static struct pci_device_id carm_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(carm_pci_tbl) = {
 	{ PCI_VENDOR_ID_PROMISE, 0x8000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
 	{ PCI_VENDOR_ID_PROMISE, 0x8002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
 	{ }	/* terminate list */