[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200728200413.GA1857901@bjorn-Precision-5520>
Date: Tue, 28 Jul 2020 15:04:13 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Vaibhav Gupta <vaibhavgupta40@...il.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
Bjorn Helgaas <bjorn@...gaas.com>,
Vaibhav Gupta <vaibhav.varodek@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Kevin Curtis <kevin.curtis@...site.co.uk>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v1] farsync: use generic power management
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.
> Change code indentation from space to tab in "struct pci_driver".
>
> Signed-off-by: Vaibhav Gupta <vaibhavgupta40@...il.com>
> ---
> drivers/net/wan/farsync.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
> index 7916efce7188..15dacfde6b83 100644
> --- a/drivers/net/wan/farsync.c
> +++ b/drivers/net/wan/farsync.c
> @@ -2636,12 +2636,10 @@ fst_remove_one(struct pci_dev *pdev)
> }
>
> static struct pci_driver fst_driver = {
> - .name = FST_NAME,
> - .id_table = fst_pci_dev_id,
> - .probe = fst_add_one,
> - .remove = fst_remove_one,
> - .suspend = NULL,
> - .resume = NULL,
> + .name = FST_NAME,
> + .id_table = fst_pci_dev_id,
> + .probe = fst_add_one,
> + .remove = fst_remove_one,
> };
>
> static int __init
> --
> 2.27.0
>
Powered by blists - more mailing lists