mbox series

[v2,0/2] smsc: use generic power management

Message ID 20200703030138.25724-1-vaibhavgupta40@gmail.com
Headers show
Series smsc: use generic power management | expand

Message

Vaibhav Gupta July 3, 2020, 3:01 a.m. UTC
Linux Kernel Mentee: Remove Legacy Power Management.

The purpose of this patch series is to remove legacy power management callbacks
from smsc ethernet drivers.

The callbacks performing suspend() and resume() operations are still calling
pci_save_state(), pci_set_power_state(), etc. and handling the power management
themselves, which is not recommended.

The conversion requires the removal of the those function calls and change the
callback definition accordingly and make use of dev_pm_ops structure.

All patches are compile-tested only.

V2: Kbuild in V1, warning: variable 'err' is used uninitialized whenever 'if'
conditio is false in funcution .resume() .

Vaibhav Gupta (2):
  epic100: use generic power management
  smsc9420: use generic power management

 drivers/net/ethernet/smsc/epic100.c  | 19 +++++--------
 drivers/net/ethernet/smsc/smsc9420.c | 40 ++++++++--------------------
 2 files changed, 17 insertions(+), 42 deletions(-)

Comments

David Miller July 7, 2020, 10:22 p.m. UTC | #1
From: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Date: Fri,  3 Jul 2020 08:31:36 +0530

> Linux Kernel Mentee: Remove Legacy Power Management.
> 
> The purpose of this patch series is to remove legacy power management callbacks
> from smsc ethernet drivers.
> 
> The callbacks performing suspend() and resume() operations are still calling
> pci_save_state(), pci_set_power_state(), etc. and handling the power management
> themselves, which is not recommended.
> 
> The conversion requires the removal of the those function calls and change the
> callback definition accordingly and make use of dev_pm_ops structure.
> 
> All patches are compile-tested only.
> 
> V2: Kbuild in V1, warning: variable 'err' is used uninitialized whenever 'if'
> conditio is false in funcution .resume() .

Series applied to net-next, thanks.