Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'sh_eth-pm-related-cleanups'

Geert Uytterhoeven says:

====================
sh_eth: PM-related cleanups

This patch series contains various cleanups related to power management
for the Renesas SH Ethernet driver, as used on Renesas SH, ARM32, and
ARM64 platforms.

This has been tested on various SoCs (R-Mobile A1, RZ/A1H, RZ/A2M, R-Car
H1, R-Car M2-W).
====================

Link: https://patch.msgid.link/cover.1756998732.git.geert+renesas@glider.be
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+4 -26
+4 -26
drivers/net/ethernet/renesas/sh_eth.c
··· 2233 2233 2234 2234 pm_runtime_get_sync(&mdp->pdev->dev); 2235 2235 __sh_eth_get_regs(ndev, buf); 2236 - pm_runtime_put_sync(&mdp->pdev->dev); 2236 + pm_runtime_put(&mdp->pdev->dev); 2237 2237 } 2238 2238 2239 2239 static u32 sh_eth_get_msglevel(struct net_device *ndev) ··· 2447 2447 free_irq(ndev->irq, ndev); 2448 2448 out_napi_off: 2449 2449 napi_disable(&mdp->napi); 2450 - pm_runtime_put_sync(&mdp->pdev->dev); 2450 + pm_runtime_put(&mdp->pdev->dev); 2451 2451 return ret; 2452 2452 } 2453 2453 ··· 3443 3443 free_netdev(ndev); 3444 3444 } 3445 3445 3446 - #ifdef CONFIG_PM 3447 - #ifdef CONFIG_PM_SLEEP 3448 3446 static int sh_eth_wol_setup(struct net_device *ndev) 3449 3447 { 3450 3448 struct sh_eth_private *mdp = netdev_priv(ndev); ··· 3525 3527 3526 3528 return ret; 3527 3529 } 3528 - #endif 3529 3530 3530 - static int sh_eth_runtime_nop(struct device *dev) 3531 - { 3532 - /* Runtime PM callback shared between ->runtime_suspend() 3533 - * and ->runtime_resume(). Simply returns success. 3534 - * 3535 - * This driver re-initializes all registers after 3536 - * pm_runtime_get_sync() anyway so there is no need 3537 - * to save and restore registers here. 3538 - */ 3539 - return 0; 3540 - } 3541 - 3542 - static const struct dev_pm_ops sh_eth_dev_pm_ops = { 3543 - SET_SYSTEM_SLEEP_PM_OPS(sh_eth_suspend, sh_eth_resume) 3544 - SET_RUNTIME_PM_OPS(sh_eth_runtime_nop, sh_eth_runtime_nop, NULL) 3545 - }; 3546 - #define SH_ETH_PM_OPS (&sh_eth_dev_pm_ops) 3547 - #else 3548 - #define SH_ETH_PM_OPS NULL 3549 - #endif 3531 + static DEFINE_SIMPLE_DEV_PM_OPS(sh_eth_dev_pm_ops, sh_eth_suspend, sh_eth_resume); 3550 3532 3551 3533 static const struct platform_device_id sh_eth_id_table[] = { 3552 3534 { "sh7619-ether", (kernel_ulong_t)&sh7619_data }, ··· 3546 3568 .id_table = sh_eth_id_table, 3547 3569 .driver = { 3548 3570 .name = CARDNAME, 3549 - .pm = SH_ETH_PM_OPS, 3571 + .pm = pm_sleep_ptr(&sh_eth_dev_pm_ops), 3550 3572 .of_match_table = of_match_ptr(sh_eth_match_table), 3551 3573 }, 3552 3574 };