提交 5ef11c56 编写于 作者: P Paul Cercueil 提交者: Rafael J. Wysocki

r8169: Avoid misuse of pm_ptr() macro

The pm_ptr() macro should be used when the suspend and resume functions
can be compiled independently of the CONFIG_PM Kconfig option.

In the case of this driver, the suspend and resume functions are inside
a section protected by a #ifdef CONFIG_PM guard. Therefore pm_ptr()
should not be used.
Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
Reviewed-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 2585cf9d
...@@ -5441,7 +5441,9 @@ static struct pci_driver rtl8169_pci_driver = { ...@@ -5441,7 +5441,9 @@ static struct pci_driver rtl8169_pci_driver = {
.probe = rtl_init_one, .probe = rtl_init_one,
.remove = rtl_remove_one, .remove = rtl_remove_one,
.shutdown = rtl_shutdown, .shutdown = rtl_shutdown,
.driver.pm = pm_ptr(&rtl8169_pm_ops), #ifdef CONFIG_PM
.driver.pm = &rtl8169_pm_ops,
#endif
}; };
module_pci_driver(rtl8169_pci_driver); module_pci_driver(rtl8169_pci_driver);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册