diff mbox series

[4/4] dmaengine: at_xdmac: use pm_ptr()

Message ID 20211007111230.2331837-5-claudiu.beznea@microchip.com (mailing list archive)
State New, archived
Headers show
Series dmaengine: at_xdmac: fixes and code enhancements | expand

Commit Message

Claudiu Beznea Oct. 7, 2021, 11:12 a.m. UTC
Use pm_ptr() macro to fill at_xdmac_driver.driver.pm.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/dma/at_xdmac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tudor Ambarus Oct. 15, 2021, 8:03 a.m. UTC | #1
On 10/7/21 2:12 PM, Claudiu Beznea wrote:
> Use pm_ptr() macro to fill at_xdmac_driver.driver.pm.

I would amend the commit message with:
If CONFIG_PM is enabled, this macro will resolve to its argument,
otherwise to NULL.

Nitpick anyway, so:
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

> ---
>  drivers/dma/at_xdmac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index 12371396fcc0..7fb19bd18ac3 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -2231,7 +2231,7 @@ static struct platform_driver at_xdmac_driver = {
>  	.driver = {
>  		.name		= "at_xdmac",
>  		.of_match_table	= of_match_ptr(atmel_xdmac_dt_ids),
> -		.pm		= &atmel_xdmac_dev_pm_ops,
> +		.pm		= pm_ptr(&atmel_xdmac_dev_pm_ops),
>  	}
>  };
>  
>
diff mbox series

Patch

diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 12371396fcc0..7fb19bd18ac3 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -2231,7 +2231,7 @@  static struct platform_driver at_xdmac_driver = {
 	.driver = {
 		.name		= "at_xdmac",
 		.of_match_table	= of_match_ptr(atmel_xdmac_dt_ids),
-		.pm		= &atmel_xdmac_dev_pm_ops,
+		.pm		= pm_ptr(&atmel_xdmac_dev_pm_ops),
 	}
 };