diff options
author | Benoit Taine <benoit.taine@lip6.fr> | 2014-08-08 09:56:03 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-08-12 14:15:14 -0400 |
commit | 9baa3c34ac4e27f7e062f266f50cc5dbea26a6c1 (patch) | |
tree | 2c6f874e1eb4dbb415ad96b6a39f1f7982655412 /sound/pci/bt87x.c | |
parent | c8d6637d0497d62093dbba0694c7b3a80b79bfe1 (diff) |
PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
meet kernel coding style guidelines. This issue was reported by checkpatch.
A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/):
// <smpl>
@@
identifier i;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer z;
@@
- DEFINE_PCI_DEVICE_TABLE(i)
+ const struct pci_device_id i[]
= z;
// </smpl>
[bhelgaas: add semantic patch]
Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'sound/pci/bt87x.c')
-rw-r--r-- | sound/pci/bt87x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 70951fd9b354..058b9973c09c 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -796,7 +796,7 @@ fail: | |||
796 | .driver_data = SND_BT87X_BOARD_ ## id } | 796 | .driver_data = SND_BT87X_BOARD_ ## id } |
797 | /* driver_data is the card id for that device */ | 797 | /* driver_data is the card id for that device */ |
798 | 798 | ||
799 | static DEFINE_PCI_DEVICE_TABLE(snd_bt87x_ids) = { | 799 | static const struct pci_device_id snd_bt87x_ids[] = { |
800 | /* Hauppauge WinTV series */ | 800 | /* Hauppauge WinTV series */ |
801 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, GENERIC), | 801 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, GENERIC), |
802 | /* Hauppauge WinTV series */ | 802 | /* Hauppauge WinTV series */ |
@@ -966,7 +966,7 @@ static void snd_bt87x_remove(struct pci_dev *pci) | |||
966 | 966 | ||
967 | /* default entries for all Bt87x cards - it's not exported */ | 967 | /* default entries for all Bt87x cards - it's not exported */ |
968 | /* driver_data is set to 0 to call detection */ | 968 | /* driver_data is set to 0 to call detection */ |
969 | static DEFINE_PCI_DEVICE_TABLE(snd_bt87x_default_ids) = { | 969 | static const struct pci_device_id snd_bt87x_default_ids[] = { |
970 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, PCI_ANY_ID, PCI_ANY_ID, UNKNOWN), | 970 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, PCI_ANY_ID, PCI_ANY_ID, UNKNOWN), |
971 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, PCI_ANY_ID, PCI_ANY_ID, UNKNOWN), | 971 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, PCI_ANY_ID, PCI_ANY_ID, UNKNOWN), |
972 | { } | 972 | { } |