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>
此提交包含在:
@@ -364,7 +364,7 @@ static struct rtl_hal_cfg rtl88ee_hal_cfg = {
|
||||
.maps[RTL_RC_HT_RATEMCS15] = DESC92C_RATEMCS15,
|
||||
};
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(rtl88ee_pci_ids) = {
|
||||
static const struct pci_device_id rtl88ee_pci_ids[] = {
|
||||
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8179, rtl88ee_hal_cfg)},
|
||||
{},
|
||||
};
|
||||
|
@@ -344,7 +344,7 @@ static struct rtl_hal_cfg rtl92ce_hal_cfg = {
|
||||
.maps[RTL_RC_HT_RATEMCS15] = DESC92_RATEMCS15,
|
||||
};
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(rtl92ce_pci_ids) = {
|
||||
static const struct pci_device_id rtl92ce_pci_ids[] = {
|
||||
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8191, rtl92ce_hal_cfg)},
|
||||
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8178, rtl92ce_hal_cfg)},
|
||||
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8177, rtl92ce_hal_cfg)},
|
||||
|
@@ -348,7 +348,7 @@ static struct rtl_hal_cfg rtl8723be_hal_cfg = {
|
||||
.maps[RTL_RC_HT_RATEMCS15] = DESC92C_RATEMCS15,
|
||||
};
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(rtl8723be_pci_id) = {
|
||||
static const struct pci_device_id rtl8723be_pci_id[] = {
|
||||
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xb723, rtl8723be_hal_cfg)},
|
||||
{},
|
||||
};
|
||||
|
新增問題並參考
封鎖使用者