From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f68.google.com ([209.85.208.68]:35257 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389100AbgEYS0S (ORCPT ); Mon, 25 May 2020 14:26:18 -0400 From: =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= Subject: [PATCH 3/8] greybus: Use the new device_to_pm() helper to access struct dev_pm_ops Date: Mon, 25 May 2020 18:26:03 +0000 Message-Id: <20200525182608.1823735-4-kw@linux.com> In-Reply-To: <20200525182608.1823735-1-kw@linux.com> References: <20200525182608.1823735-1-kw@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-s390-owner@vger.kernel.org List-ID: To: Dan Carpenter Cc: "Rafael J. Wysocki" , Len Brown , Kevin Hilman , Ulf Hansson , Pavel Machek , Greg Kroah-Hartman , Johan Hovold , Alex Elder , Bjorn Helgaas , "James E.J. Bottomley" , "Martin K. Petersen" , Felipe Balbi , Julian Wiedmann , Karsten Graul , Ursula Braun , Jakub Kicinski , Bjorn Andersson , John Stultz , "David S. Miller" , greybus-dev@lists.linaro.org, netdev@vger.kernel.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org 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 --- 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