Skip to contentSkip to conversation

w1: matrox: use DEFINE_PCI_DEVICE_TABLE macro

PATCH In review Jingoo Han 2 participants 3 messages Nov 28, 2013 W1 dallas's 1-wire bus

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 w1: matrox: use DEFINE_PCI_DEVICE_TABLE macro

This macro is used to create a struct pci_device_id array.

---
 drivers/w1/masters/matrox_w1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/w1/masters/matrox_w1.c +1 -1
index d8667b0..9361cea 100644
@@ -42,7 +42,7 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Evgeniy Polyakov <[email protected]>");
 MODULE_DESCRIPTION("Driver for transport(Dallas 1-wire prtocol) over VGA DDC(matrox gpio).");
 
-static struct pci_device_id matrox_w1_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(matrox_w1_tbl) = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G400) },
 	{ },
 };
Signature · 1 line
1.7.10.4
author
#1 lore raw
Quoted 4 lines · Jingoo Han

This macro is used to create a struct pci_device_id array.

Please, ignore these patches.
According to the Greg Kroah-Hartman,

"Yeah, and it's a horrid macro that deserves to be removed, please don't use it in more places.

Actually, if you could just remove it, that would be best, sorry, I'm not going to take these patches."

So, I will send the patch to remove 'DEFINE_PCI_DEVICE_TABLE' instead. Sorry for annoying. :-)

Best regards,
Jingoo Han

Quoted 19 lines
---
 drivers/w1/masters/matrox_w1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/w1/masters/matrox_w1.c +1 -2
index d8667b0..9361cea 100644
@@ -42,7 +42,7 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Evgeniy Polyakov <[email protected]>");
 MODULE_DESCRIPTION("Driver for transport(Dallas 1-wire prtocol) over VGA DDC(matrox gpio).");
 
-static struct pci_device_id matrox_w1_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(matrox_w1_tbl) = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G400) },
 	{ },
 };
--

1.7.10.4

#2 lore raw

Hi

28.11.2013, 08:40, "Jingoo Han" <[email protected]>:

Quoted 8 lines

"Yeah, and it's a horrid macro that deserves to be removed, please don't use it in more places.

Actually, if you could just remove it, that would be best, sorry, I'm not going to take these patches."

So, I will send the patch to remove 'DEFINE_PCI_DEVICE_TABLE' instead. Sorry for annoying. :-)

No problem :)
Thanks for noticing this issue