Skip to contentSkip to conversation

Input: emu10k1 - use DEFINE_PCI_DEVICE_TABLE macro

PATCH Applied Jingoo Han 2 participants 6 messages Nov 28, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/3 Input: emu10k1 - use DEFINE_PCI_DEVICE_TABLE macro

This macro is used to create a struct pci_device_id array.

---
 drivers/input/gameport/emu10k1-gp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/gameport/emu10k1-gp.c +1 -1
index fa7a95c..72a7213 100644
@@ -46,7 +46,7 @@ struct emu {
 	int size;
 };
 
-static const struct pci_device_id emu_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(emu_tbl) = {
 
 	{ 0x1102, 0x7002, PCI_ANY_ID, PCI_ANY_ID }, /* SB Live gameport */
 	{ 0x1102, 0x7003, PCI_ANY_ID, PCI_ANY_ID }, /* Audigy gameport */
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/3 Input: fm801-gp - use DEFINE_PCI_DEVICE_TABLE macro

This macro is used to create a struct pci_device_id array.

---
 drivers/input/gameport/fm801-gp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/gameport/fm801-gp.c +1 -1
index ae912d3..5ace35bf 100644
@@ -140,7 +140,7 @@ static void fm801_gp_remove(struct pci_dev *pci)
 	pci_disable_device(pci);
 }
 
-static const struct pci_device_id fm801_gp_id_table[] = {
+static DEFINE_PCI_DEVICE_TABLE(fm801_gp_id_table) = {
 	{ PCI_VENDOR_ID_FORTEMEDIA, PCI_DEVICE_ID_FM801_GP, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0  },
 	{ 0 }
 };
Signature · 1 line
1.7.10.4
author
#2 lore raw

PATCH 3/3 Input: pcips2 - use DEFINE_PCI_DEVICE_TABLE macro

In reply to Jingoo Han

This macro is used to create a struct pci_device_id array.

---
 drivers/input/serio/pcips2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/serio/pcips2.c +1 -1
index 13062f6..2fff5d4 100644
@@ -186,7 +186,7 @@ static void pcips2_remove(struct pci_dev *dev)
 	pci_disable_device(dev);
 }
 
-static const struct pci_device_id pcips2_ids[] = {
+static DEFINE_PCI_DEVICE_TABLE(pcips2_ids) = {
 	{
 		.vendor		= 0x14f2,	/* MOBILITY */
 		.device		= 0x0123,	/* Keyboard */
Signature · 1 line
1.7.10.4
maintainer Applied
#3 lore raw

Re: [PATCH 3/3] Input: pcips2 - use DEFINE_PCI_DEVICE_TABLE macro

Quoted 1 line · Jingoo Han

This macro is used to create a struct pci_device_id array.

Applied all 3, thank you.

Quoted 23 lines
---
 drivers/input/serio/pcips2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/serio/pcips2.c +1 -1
index 13062f6..2fff5d4 100644
@@ -186,7 +186,7 @@ static void pcips2_remove(struct pci_dev *dev)
 	pci_disable_device(dev);
 }
 
-static const struct pci_device_id pcips2_ids[] = {
+static DEFINE_PCI_DEVICE_TABLE(pcips2_ids) = {
 	{
 		.vendor		= 0x14f2,	/* MOBILITY */
 		.device		= 0x0123,	/* Keyboard */
Signature · 1 line
1.7.10.4
Signature · 1 line
Dmitry
author
#4 lore raw

Re: [PATCH 3/3] Input: pcips2 - use DEFINE_PCI_DEVICE_TABLE macro

Quoted 4 lines · Dmitry Torokhov
Quoted 1 line · Jingoo Han

This macro is used to create a struct pci_device_id array.

Applied all 3, thank you.

Please, drop 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 27 lines
Quoted 21 lines
---
 drivers/input/serio/pcips2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/serio/pcips2.c +1 -2
index 13062f6..2fff5d4 100644
@@ -186,7 +186,7 @@ static void pcips2_remove(struct pci_dev *dev)
 	pci_disable_device(dev);
 }
 
-static const struct pci_device_id pcips2_ids[] = {
+static DEFINE_PCI_DEVICE_TABLE(pcips2_ids) = {
 	{
 		.vendor		= 0x14f2,	/* MOBILITY */
 		.device		= 0x0123,	/* Keyboard */
--
Quoted 3 lines

1.7.10.4

--
Dmitry

maintainer
#5 lore raw

Re: [PATCH 3/3] Input: pcips2 - use DEFINE_PCI_DEVICE_TABLE macro

Quoted 9 lines · Jingoo Han
Quoted 4 lines · Dmitry Torokhov
Quoted 1 line · Jingoo Han

This macro is used to create a struct pci_device_id array.

Applied all 3, thank you.

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

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 worries, I dropped them.

Thanks.

Signature · 1 line
Dmitry