[PATCH v4 11/15] gpio: tqmx86: Use modern PM macros

Jisheng Zhang jszhang at kernel.org
Wed Nov 19 16:10:28 PST 2025


On Wed, Nov 19, 2025 at 07:19:58PM +0200, Andy Shevchenko wrote:
> On Thu, Nov 20, 2025 at 12:33:23AM +0800, Jisheng Zhang wrote:
> > Use the modern PM macros for the suspend and resume functions to be
> > automatically dropped by the compiler when CONFIG_PM or
> > CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused
> 
> ...
> 
> >  static const struct dev_pm_ops tqmx86_gpio_dev_pm_ops = {
> > -	SET_RUNTIME_PM_OPS(tqmx86_gpio_runtime_suspend,
> > -			   tqmx86_gpio_runtime_resume, NULL)
> > +	RUNTIME_PM_OPS(tqmx86_gpio_runtime_suspend, tqmx86_gpio_runtime_resume, NULL)
> >  };
> 
> ...
> 
> >  static struct platform_driver tqmx86_gpio_driver = {
> >  	.driver = {
> >  		.name = "tqmx86-gpio",
> > -		.pm = &tqmx86_gpio_dev_pm_ops,
> > +		.pm = pm_sleep_ptr(&tqmx86_gpio_dev_pm_ops),
> 
> For RPM this should be pm_ptr(), no?

Indeed, pm_ptr() is better. Thanks. Let me do it in next version, I will
wait for one or two days as Bart kindly reminded ;)

> 
> >  	},
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 



More information about the linux-arm-kernel mailing list