[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200629073604.205478-4-vaibhavgupta40@gmail.com>
Date: Mon, 29 Jun 2020 13:06:01 +0530
From: Vaibhav Gupta <vaibhavgupta40@...il.com>
To: Bjorn Helgaas <helgaas@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, bjorn@...gaas.com,
Vaibhav Gupta <vaibhav.varodek@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: Vaibhav Gupta <vaibhavgupta40@...il.com>,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org,
skhan@...uxfoundation.org
Subject: [PATCH v1 3/6] [media] cx25821: use generic power management
The .suspend() and .resume() callbacks are not defined for this driver.
Still, their power managemgement stucture can be easily upgraded to
gemeric, without affecting its normal behaviour.
Hence, define them NULL and use struct dev_pm_ops type to bind them.
Compile-tested only.
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@...il.com>
---
drivers/media/pci/cx25821/cx25821-core.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c
index 41be22ce66f3..59501939d741 100644
--- a/drivers/media/pci/cx25821/cx25821-core.c
+++ b/drivers/media/pci/cx25821/cx25821-core.c
@@ -1369,14 +1369,18 @@ static const struct pci_device_id cx25821_pci_tbl[] = {
MODULE_DEVICE_TABLE(pci, cx25821_pci_tbl);
+#define cx25821_suspend NULL
+#define cx25821_resume NULL
+
+static SIMPLE_DEV_PM_OPS(cx25821_pm_ops, cx25821_suspend, cx25821_resume);
+
static struct pci_driver cx25821_pci_driver = {
.name = "cx25821",
.id_table = cx25821_pci_tbl,
.probe = cx25821_initdev,
.remove = cx25821_finidev,
/* TODO */
- .suspend = NULL,
- .resume = NULL,
+ .driver.pm = &cx25821_pm_ops,
};
static int __init cx25821_init(void)
--
2.27.0
Powered by blists - more mailing lists