[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200525182608.1823735-4-kw@linux.com>
Date: Mon, 25 May 2020 18:26:03 +0000
From: Krzysztof Wilczyński <kw@...ux.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>, Kevin Hilman <khilman@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
Pavel Machek <pavel@....cz>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Johan Hovold <johan@...nel.org>, Alex Elder <elder@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Felipe Balbi <balbi@...nel.org>,
Julian Wiedmann <jwi@...ux.ibm.com>,
Karsten Graul <kgraul@...ux.ibm.com>,
Ursula Braun <ubraun@...ux.ibm.com>,
Jakub Kicinski <kuba@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
John Stultz <john.stultz@...aro.org>,
"David S. Miller" <davem@...emloft.net>,
greybus-dev@...ts.linaro.org, netdev@...r.kernel.org,
linux-acpi@...r.kernel.org, linux-pci@...r.kernel.org,
linux-pm@...r.kernel.org, linux-s390@...r.kernel.org,
linux-scsi@...r.kernel.org, linux-usb@...r.kernel.org
Subject: [PATCH 3/8] greybus: Use the new device_to_pm() helper to access struct dev_pm_ops
Use the new device_to_pm() helper to access Power Management callbacs
(struct dev_pm_ops) for a particular device (struct device_driver).
No functional change intended.
Signed-off-by: Krzysztof Wilczyński <kw@...ux.com>
---
drivers/greybus/bundle.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/greybus/bundle.c b/drivers/greybus/bundle.c
index 84660729538b..d38d3a630812 100644
--- a/drivers/greybus/bundle.c
+++ b/drivers/greybus/bundle.c
@@ -108,7 +108,7 @@ static void gb_bundle_enable_all_connections(struct gb_bundle *bundle)
static int gb_bundle_suspend(struct device *dev)
{
struct gb_bundle *bundle = to_gb_bundle(dev);
- const struct dev_pm_ops *pm = dev->driver->pm;
+ const struct dev_pm_ops *pm = driver_to_pm(dev->driver);
int ret;
if (pm && pm->runtime_suspend) {
@@ -135,7 +135,7 @@ static int gb_bundle_suspend(struct device *dev)
static int gb_bundle_resume(struct device *dev)
{
struct gb_bundle *bundle = to_gb_bundle(dev);
- const struct dev_pm_ops *pm = dev->driver->pm;
+ const struct dev_pm_ops *pm = driver_to_pm(dev->driver);
int ret;
ret = gb_control_bundle_resume(bundle->intf->control, bundle->id);
--
2.26.2
Powered by blists - more mailing lists