diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2020-12-08 09:37:46 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-12-08 09:34:35 +0200 |
commit | 91aeaf09a6eed83cae0d0fad20a97699b1c8b812 (patch) | |
tree | d02004115ee6ad692eb77c41ed49a17519354ce8 /drivers/net/wireless/realtek/rtw88 | |
parent | 5c455c5ab332773464d02ba17015acdca198f03d (diff) |
rtw88: fix multiple definition of rtw_pm_ops
'const struct dev_pm_ops rtw_pm_ops' is declared by pci.c, and it should be
declare as 'extern' in pci.h. Without 'extern' causes every file including
pci.h has an individual instance of rtw_pm_ops but not reference to the one
declared in pci.c
If kernel config, like test robot, doesn't build driver as module, it leads
multiple definition.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 2e86ef413ab3 ("rtw88: pci: Add prototypes for .probe, .remove and .shutdown")
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201208013746.11065-1-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/pci.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/pci.h b/drivers/net/wireless/realtek/rtw88/pci.h index cda56919a5f0..7cdefe229824 100644 --- a/drivers/net/wireless/realtek/rtw88/pci.h +++ b/drivers/net/wireless/realtek/rtw88/pci.h @@ -214,7 +214,7 @@ struct rtw_pci { void __iomem *mmap; }; -const struct dev_pm_ops rtw_pm_ops; +extern const struct dev_pm_ops rtw_pm_ops; int rtw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id); void rtw_pci_remove(struct pci_dev *pdev); |