Skip to content

Commit 5ef11c5

Browse files
pcercueirafaeljw
authored andcommitted
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: Paul Cercueil <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 2585cf9 commit 5ef11c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5441,7 +5441,9 @@ static struct pci_driver rtl8169_pci_driver = {
54415441
.probe = rtl_init_one,
54425442
.remove = rtl_remove_one,
54435443
.shutdown = rtl_shutdown,
5444-
.driver.pm = pm_ptr(&rtl8169_pm_ops),
5444+
#ifdef CONFIG_PM
5445+
.driver.pm = &rtl8169_pm_ops,
5446+
#endif
54455447
};
54465448

54475449
module_pci_driver(rtl8169_pci_driver);

0 commit comments

Comments
 (0)