RE: [PATCH 04/36] iio: adc: imx7d_adc: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Jonathan Cameron <jic23@xxxxxxxxxx>
> Sent: 2022年6月22日 4:27
> To: linux-iio@xxxxxxxxxxxxxxx; Paul Cercueil <paul@xxxxxxxxxxxxxxx>
> Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>; Brian Masney
> <masneyb@xxxxxxxxxxxxx>; David Heidelberg <david@xxxxxxx>; Cai Huoqing
> <cai.huoqing@xxxxxxxxx>; Christian Eggers <ceggers@xxxxxxx>; Enric Balletbo i
> Serra <enric.balletbo@xxxxxxxxxxxxx>; Eugen Hristev
> <eugen.hristev@xxxxxxxxxxxxx>; Gwendal Grignou <gwendal@xxxxxxxxxxxx>;
> Bough Chen <haibo.chen@xxxxxxx>; Hui Liu <hui.liu@xxxxxxxxxxxx>; Joe
> Sandom <joe.g.sandom@xxxxxxxxx>; Ismail H . Kose <ihkose@xxxxxxxxx>;
> Lars-Peter Clausen <lars@xxxxxxxxxx>; Linus Walleij <linus.walleij@xxxxxxxxxx>;
> Ludovic Desroches <ludovic.desroches@xxxxxxxxxxxxx>; Nicolas Ferre
> <nicolas.ferre@xxxxxxxxxxxxx>; Marcus Folkesson
> <marcus.folkesson@xxxxxxxxx>; Martin Blumenstingl
> <martin.blumenstingl@xxxxxxxxxxxxxx>; Mathieu Othacehe
> <m.othacehe@xxxxxxxxx>; Michal Simek <michal.simek@xxxxxxxxxx>; Miquel
> Raynal <miquel.raynal@xxxxxxxxxxx>; Nuno Sá <nuno.sa@xxxxxxxxxx>;
> Parthiban Nallathambi <pn@xxxxxxx>; Philippe Reynes <tremyfr@xxxxxxxx>;
> Philippe Schenker <philippe.schenker@xxxxxxxxxxx>; Rishi Gupta
> <gupt21@xxxxxxxxx>; Roan van Dijk <roan@xxxxxxxxxxx>; Stephen Boyd
> <swboyd@xxxxxxxxxxxx>; Tomasz Duszynski <tduszyns@xxxxxxxxx>; Zhiyong
> Tao <zhiyong.tao@xxxxxxxxxxxx>; Jonathan Cameron
> <Jonathan.Cameron@xxxxxxxxxx>
> Subject: [PATCH 04/36] iio: adc: imx7d_adc: Switch to
> DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
> 
> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> 
> In this case we only gain the ability to have the compiler drop the struct
> dev_pm_ops because the callbacks are called from paths other than suspend
> and resume.  In general the purpose of this new macro is to allow automated
> removal of the callbacks as well, but that doesn't apply here.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> Cc: Haibo Chen <haibo.chen@xxxxxxx>

Reviewed-by: Haibo Chen <haibo.chen@xxxxxxx>

> ---
>  drivers/iio/adc/imx7d_adc.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/imx7d_adc.c b/drivers/iio/adc/imx7d_adc.c index
> 119217af2bde..86caff1d006b 100644
> --- a/drivers/iio/adc/imx7d_adc.c
> +++ b/drivers/iio/adc/imx7d_adc.c
> @@ -540,14 +540,15 @@ static int imx7d_adc_probe(struct platform_device
> *pdev)
>  	return 0;
>  }
> 
> -static SIMPLE_DEV_PM_OPS(imx7d_adc_pm_ops, imx7d_adc_disable,
> imx7d_adc_enable);
> +static DEFINE_SIMPLE_DEV_PM_OPS(imx7d_adc_pm_ops,
> imx7d_adc_disable,
> +				imx7d_adc_enable);
> 
>  static struct platform_driver imx7d_adc_driver = {
>  	.probe		= imx7d_adc_probe,
>  	.driver		= {
>  		.name	= "imx7d_adc",
>  		.of_match_table = imx7d_adc_match,
> -		.pm	= &imx7d_adc_pm_ops,
> +		.pm	= pm_sleep_ptr(&imx7d_adc_pm_ops),
>  	},
>  };
> 
> --
> 2.36.1





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux