linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] [media] netup_unidvb: use generic power management
@ 2020-07-28  9:27 Vaibhav Gupta
  2020-07-28 12:38 ` Vaibhav Gupta
  2020-08-30  8:10 ` Sean Young
  0 siblings, 2 replies; 5+ messages in thread
From: Vaibhav Gupta @ 2020-07-28  9:27 UTC (permalink / raw)
  To: Bjorn Helgaas, Bjorn Helgaas, Bjorn Helgaas, Vaibhav Gupta,
	Mauro Carvalho Chehab, Sergey Kozlov, Abylay Ospan, Hans Verkuil
  Cc: Vaibhav Gupta, linux-kernel, linux-media, linux-kernel-mentees,
	Shuah Khan

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".

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
---
 drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
index 80a7c41baa90..6f3125c2d097 100644
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
@@ -1016,8 +1016,6 @@ static struct pci_driver netup_unidvb_pci_driver = {
 	.id_table = netup_unidvb_pci_tbl,
 	.probe    = netup_unidvb_initdev,
 	.remove   = netup_unidvb_finidev,
-	.suspend  = NULL,
-	.resume   = NULL,
 };
 
 module_pci_driver(netup_unidvb_pci_driver);
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] [media] netup_unidvb: use generic power management
  2020-07-28  9:27 [PATCH v1] [media] netup_unidvb: use generic power management Vaibhav Gupta
@ 2020-07-28 12:38 ` Vaibhav Gupta
  2020-08-30  8:10 ` Sean Young
  1 sibling, 0 replies; 5+ messages in thread
From: Vaibhav Gupta @ 2020-07-28 12:38 UTC (permalink / raw)
  To: Bjorn Helgaas, Bjorn Helgaas, Bjorn Helgaas, Vaibhav Gupta,
	Mauro Carvalho Chehab, Sergey Kozlov, Abylay Ospan, Hans Verkuil
  Cc: linux-kernel, linux-media, linux-kernel-mentees, Shuah Khan

This patch is compile-tested only.

Thanks
Vaibhav Gupta

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] [media] netup_unidvb: use generic power management
  2020-07-28  9:27 [PATCH v1] [media] netup_unidvb: use generic power management Vaibhav Gupta
  2020-07-28 12:38 ` Vaibhav Gupta
@ 2020-08-30  8:10 ` Sean Young
  2020-08-30  8:43   ` Vaibhav Gupta
  2020-08-30  9:44   ` [PATCH v2] netup_unidvb: drop initialization of PM pointers Vaibhav Gupta
  1 sibling, 2 replies; 5+ messages in thread
From: Sean Young @ 2020-08-30  8:10 UTC (permalink / raw)
  To: Vaibhav Gupta
  Cc: Bjorn Helgaas, Bjorn Helgaas, Bjorn Helgaas, Vaibhav Gupta,
	Mauro Carvalho Chehab, Sergey Kozlov, Abylay Ospan, Hans Verkuil,
	linux-kernel, linux-media, linux-kernel-mentees, Shuah Khan

On Tue, Jul 28, 2020 at 02:57:17PM +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".

Unlisted fields in a static struct initializer will get set to 0 (or NULL
for pointers) already. Removing the NULL initializers will not change
anything.

Possibly you want to remove the redundant initializers but your commit
message should say so.


Sean

> 
> Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
> ---
>  drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
> index 80a7c41baa90..6f3125c2d097 100644
> --- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
> +++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
> @@ -1016,8 +1016,6 @@ static struct pci_driver netup_unidvb_pci_driver = {
>  	.id_table = netup_unidvb_pci_tbl,
>  	.probe    = netup_unidvb_initdev,
>  	.remove   = netup_unidvb_finidev,
> -	.suspend  = NULL,
> -	.resume   = NULL,
>  };
>  
>  module_pci_driver(netup_unidvb_pci_driver);
> -- 
> 2.27.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] [media] netup_unidvb: use generic power management
  2020-08-30  8:10 ` Sean Young
@ 2020-08-30  8:43   ` Vaibhav Gupta
  2020-08-30  9:44   ` [PATCH v2] netup_unidvb: drop initialization of PM pointers Vaibhav Gupta
  1 sibling, 0 replies; 5+ messages in thread
From: Vaibhav Gupta @ 2020-08-30  8:43 UTC (permalink / raw)
  To: Sean Young
  Cc: Bjorn Helgaas, Bjorn Helgaas, Bjorn Helgaas, Vaibhav Gupta,
	Mauro Carvalho Chehab, Sergey Kozlov, Abylay Ospan, Hans Verkuil,
	linux-kernel, linux-media, linux-kernel-mentees, Shuah Khan

On Sun, Aug 30, 2020 at 09:10:04AM +0100, Sean Young wrote:
> On Tue, Jul 28, 2020 at 02:57:17PM +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".
> 
> Unlisted fields in a static struct initializer will get set to 0 (or NULL
> for pointers) already. Removing the NULL initializers will not change
> anything.
> 
> Possibly you want to remove the redundant initializers but your commit
> message should say so.
> 
> 
> Sean
> 
Hello Sean,

Yes, you are right. I mentioned a general commit message. I will send a v2 with
suggested changes.

Thank you
Vaibhav Gupta

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] netup_unidvb: drop initialization of PM pointers
  2020-08-30  8:10 ` Sean Young
  2020-08-30  8:43   ` Vaibhav Gupta
@ 2020-08-30  9:44   ` Vaibhav Gupta
  1 sibling, 0 replies; 5+ messages in thread
From: Vaibhav Gupta @ 2020-08-30  9:44 UTC (permalink / raw)
  To: Sean Young, Bjorn Helgaas, Bjorn Helgaas, Bjorn Helgaas,
	Vaibhav Gupta, Mauro Carvalho Chehab, Sergey Kozlov,
	Abylay Ospan, Hans Verkuil
  Cc: Vaibhav Gupta, linux-kernel, linux-media, linux-kernel-mentees,
	Shuah Khan

The .suspend() and .resume() callbacks are not defined for this driver.
Thus, just the unlisting of PM pointers in the struct initializer will make
no change in its behavior. Still unlisting is necessary so as to get rid of
.suspend and .resume pointers as they are part of the legacy framework and
should not be used in the driver code explicitly.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
---
 drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
index 80a7c41baa90..6f3125c2d097 100644
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
@@ -1016,8 +1016,6 @@ static struct pci_driver netup_unidvb_pci_driver = {
 	.id_table = netup_unidvb_pci_tbl,
 	.probe    = netup_unidvb_initdev,
 	.remove   = netup_unidvb_finidev,
-	.suspend  = NULL,
-	.resume   = NULL,
 };
 
 module_pci_driver(netup_unidvb_pci_driver);
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-30  9:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28  9:27 [PATCH v1] [media] netup_unidvb: use generic power management Vaibhav Gupta
2020-07-28 12:38 ` Vaibhav Gupta
2020-08-30  8:10 ` Sean Young
2020-08-30  8:43   ` Vaibhav Gupta
2020-08-30  9:44   ` [PATCH v2] netup_unidvb: drop initialization of PM pointers Vaibhav Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).