netup_unidvb: use generic power management
PATCH 1/1 netup_unidvb: use generic power management
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".
--- drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 -- 1 file changed, 2 deletions(-)
drivers/media/pci/netup_unidvb/netup_unidvb_core.c +0 -2
@@ -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);
Signature · 6 lines
2.27.0 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
This patch is compile-tested only.
Thanks
Vaibhav Gupta
Quoted 4 lines · Vaibhav Gupta
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
Quoted 21 lines
Signed-off-by Vaibhav Gupta <[email protected]>--- drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 -- 1 file changed, 2 deletions(-)drivers/media/pci/netup_unidvb/netup_unidvb_core.c +0
-2@@ -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);Signature · 1 line
2.27.0
Quoted 10 lines · Sean Young
Quoted 4 lines · Vaibhav Gupta
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.
Quoted 6 lines
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
PATCH v2 1/1 netup_unidvb: drop initialization of PM pointers
In reply to Sean YoungThe .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.
--- drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 -- 1 file changed, 2 deletions(-)
drivers/media/pci/netup_unidvb/netup_unidvb_core.c +0 -2
@@ -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);
Signature · 6 lines
2.28.0 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees