[Linux-kernel-mentees] [PATCH v1] farsync: use generic power management
vaibhavgupta40 at gmail.com
Wed Jul 29 10:17:30 UTC 2020
On Tue, Jul 28, 2020 at 03:04:13PM -0500, Bjorn Helgaas wrote:
> On Tue, Jul 28, 2020 at 09:58:10AM +0530, Vaibhav Gupta wrote:
> > The .suspend() and .resume() callbacks are not defined for this driver.
> > Still, their power management structure follows the legacy framework. To
> > bring it under the generic framework, simply remove the binding of
> > callbacks from "struct pci_driver".
> FWIW, this commit log is slightly misleading because .suspend and
> .resume are NULL by default, so this patch actually is a complete
> no-op as far as code generation is concerned.
> This change is worthwhile because it simplifies the code a little, but
> it doesn't convert the driver from legacy to generic power management.
> This driver doesn't supply a .pm structure, so it doesn't seem to do
> *any* power management.
Agreed. Actually, as their presence only causes PCI core to call
pci_legacy_suspend/resume() for them, I thought that after removing the binding
from "struct pci_driver", this driver qualifies to be grouped under genric
framework, so used "use generic power management" for the heading.
I should have written "remove legacy bindning".
But David has applied the patch, should I send a v2 or fix to update message?
> > Change code indentation from space to tab in "struct pci_driver".
More information about the Linux-kernel-mentees