Skip to contentSkip to conversation

hwmon: (fam15h_power) use DEFINE_PCI_DEVICE_TABLE macro

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

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/2 hwmon: (fam15h_power) use DEFINE_PCI_DEVICE_TABLE macro

This macro is used to create a struct pci_device_id array.

---
 drivers/hwmon/fam15h_power.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/fam15h_power.c +1 -1
index dff8410..dd0006c 100644
@@ -132,7 +132,7 @@ static bool fam15h_power_is_internal_node0(struct pci_dev *f4)
  * counter saturations resulting in bogus power readings.
  * We correct this value ourselves to cope with older BIOSes.
  */
-static const struct pci_device_id affected_device[] = {
+static DEFINE_PCI_DEVICE_TABLE(affected_device) = {
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
 	{ 0 }
 };
Signature · 8 lines
1.7.10.4



_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
author
#2 lore raw
In reply to Jingoo Han
Quoted 7 lines · Guenter Roeck
Quoted 4 lines · Jingoo Han

This macro is used to create a struct pci_device_id array.

---

Applied to -next.

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 2 lines

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

maintainer
#3 lore raw
In reply to Jingoo Han
Quoted 12 lines · Jingoo Han
Quoted 7 lines · Guenter Roeck
Quoted 4 lines · Jingoo Han

This macro is used to create a struct pci_device_id array.

---

Applied to -next.

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

Quoted 9 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. :-)

Ok, I'll drop the patches. I hope Greg's statement is the "final" word from senior maintainers, though - I don't want to have to go back and forth with this.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors