[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220726095948.1809038-2-claudiu.beznea@microchip.com>
Date: Tue, 26 Jul 2022 12:59:48 +0300
From: Claudiu Beznea <claudiu.beznea@...rochip.com>
To: <balbi@...nel.org>, <gregkh@...uxfoundation.org>,
<nicolas.ferre@...rochip.com>, <alexandre.belloni@...tlin.com>,
<cristian.birsan@...rochip.com>
CC: <linux-usb@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
Claudiu Beznea <claudiu.beznea@...rochip.com>
Subject: [PATCH 2/2] usb: gadget: udc: atmel: remove #ifdef CONFIG_PM_SLEEP
Remove #ifdef CONFIG_PM_SLEEP and use DEFINE_SIMPLE_DEV_PM_OPS() along with
pm_sleep_ptr().
Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
---
drivers/usb/gadget/udc/atmel_usba_udc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index ae2bfbac603e..6c088f6e9afa 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -2384,7 +2384,6 @@ static int usba_udc_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
static int usba_udc_suspend(struct device *dev)
{
struct usba_udc *udc = dev_get_drvdata(dev);
@@ -2442,15 +2441,14 @@ static int usba_udc_resume(struct device *dev)
return 0;
}
-#endif
-static SIMPLE_DEV_PM_OPS(usba_udc_pm_ops, usba_udc_suspend, usba_udc_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(usba_udc_pm_ops, usba_udc_suspend, usba_udc_resume);
static struct platform_driver udc_driver = {
.remove = usba_udc_remove,
.driver = {
.name = "atmel_usba_udc",
- .pm = &usba_udc_pm_ops,
+ .pm = pm_sleep_ptr(&usba_udc_pm_ops),
.of_match_table = atmel_udc_dt_ids,
},
};
--
2.34.1
Powered by blists - more mailing lists