[PATCH v2 5/5] pwm: dwc: use pm_sleep_ptr() macro

Raag Jadav posted 5 patches 2 years ago
There is a newer version of this series
[PATCH v2 5/5] pwm: dwc: use pm_sleep_ptr() macro
Posted by Raag Jadav 2 years ago
Since we don't have runtime PM handles here, we should be using
pm_sleep_ptr() macro, so that the compiler can discard it in case
CONFIG_PM_SLEEP=n.

Fixes: 30b5b066fa83 ("pwm: dwc: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions")
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
 drivers/pwm/pwm-dwc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c
index cc5bba977f47..bb39cc34f895 100644
--- a/drivers/pwm/pwm-dwc.c
+++ b/drivers/pwm/pwm-dwc.c
@@ -127,7 +127,7 @@ static struct pci_driver dwc_pwm_driver = {
 	.remove = dwc_pwm_remove,
 	.id_table = dwc_pwm_id_table,
 	.driver = {
-		.pm = pm_ptr(&dwc_pwm_pm_ops),
+		.pm = pm_sleep_ptr(&dwc_pwm_pm_ops),
 	},
 };
 
-- 
2.35.3
Re: [PATCH v2 5/5] pwm: dwc: use pm_sleep_ptr() macro
Posted by Andy Shevchenko 2 years ago
On Thu, Feb 08, 2024 at 12:35:29PM +0530, Raag Jadav wrote:
> Since we don't have runtime PM handles here, we should be using
> pm_sleep_ptr() macro, so that the compiler can discard it in case
> CONFIG_PM_SLEEP=n.

> Fixes: 30b5b066fa83 ("pwm: dwc: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions")

Fixes always should go first in the series.

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v2 5/5] pwm: dwc: use pm_sleep_ptr() macro
Posted by Uwe Kleine-König 1 year, 11 months ago
On Thu, Feb 08, 2024 at 07:22:52PM +0200, Andy Shevchenko wrote:
> On Thu, Feb 08, 2024 at 12:35:29PM +0530, Raag Jadav wrote:
> > Since we don't have runtime PM handles here, we should be using
> > pm_sleep_ptr() macro, so that the compiler can discard it in case
> > CONFIG_PM_SLEEP=n.
> 
> > Fixes: 30b5b066fa83 ("pwm: dwc: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions")
> 
> Fixes always should go first in the series.

No need to resend for that, I'll pick patches 3-5 in the order I
consider sensible. Git seems to handle that just fine.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |