telephony/ixj: fix compiler warning on ixj_pci_tbl
PATCH 1/1 telephony/ixj: fix compiler warning on ixj_pci_tbl
Annotate ixj_pci_tbl as '__used' to fix following warning:
CC drivers/telephony/ixj.odrivers/telephony/ixj.c:287: warning: ‘ixj_pci_tbl’ defined but not used
Signed-off-by Namhyung Kim <[email protected]>
--- drivers/telephony/ixj.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/telephony/ixj.c +1 -1
@@ -284,7 +284,7 @@ static int samplerate = 100;module_param (ixjdebug, int,0 ); -static struct pci_device_id ixj_pci_tbl[]__devinitdata = { +static struct pci_device_id ixj_pci_tbl[]__devinitdata __used = { {PCI_VENDOR_ID_QUICKNET ,PCI_DEVICE_ID_QUICKNET_XJ ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, { }
Signature · 1 line
1.7.0.4
Quoted 15 lines · On Wed, 8 Dec 2010 00:49:53 +0900 Namhyung Kim <[email protected]> wrote:
Annotate
ixj_pci_tblas '__used' to fix following warning:CC
drivers/telephony/ixj.odrivers/telephony/ixj.c:287: warning:___ixj_pci_tbl___defined but not usedSigned-off-by Namhyung Kim <[email protected]>--- drivers/telephony/ixj.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/telephony/ixj.c +0
-0
drivers/telephony/ixj.c static int samplerate = 100; · line 290
Quoted 8 lines
drivers/telephony/ixj.c +1
-1@@ -284,7 +284,7 @@ static int samplerate = 100;module_param (ixjdebug, int,0 ); -static struct pci_device_id ixj_pci_tbl[]__devinitdata = { +static struct pci_device_id ixj_pci_tbl[]__devinitdata __used = { {PCI_VENDOR_ID_QUICKNET ,PCI_DEVICE_ID_QUICKNET_XJ ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, { }
This way, I believe:
drivers/telephony/ixj.c renamed from drivers/telephony/ixj.c~a +1 -2
@@ -284,12 +284,11 @@ static int samplerate = 100;module_param (ixjdebug, int,0 ); -static struct pci_device_id ixj_pci_tbl[]__devinitdata = { +static DEFINE_PCI_DEVICE_TABLE (ixj_pci_tbl) = { {PCI_VENDOR_ID_QUICKNET ,PCI_DEVICE_ID_QUICKNET_XJ ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, { } }; -MODULE_DEVICE_TABLE (pci, ixj_pci_tbl);/************************************************************************
It fixes the warning, but I'm not sure how it did that.