diff mbox

[07/11] dmaengine: at_hdmac: add a few const qualifiers

Message ID 1342182734-321-9-git-send-email-y
State New
Headers show

Commit Message

y@pengutronix.de July 13, 2012, 12:32 p.m. UTC
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

This prepares of_device_id.data becoming const. Without this change
the following warning would occur:

	drivers/dma/at_hdmac.c: In function 'at_dma_get_driver_data':
	drivers/dma/at_hdmac.c:1228: warning: return discards qualifiers from pointer target type

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
---
 drivers/dma/at_hdmac.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Nicolas Ferre July 13, 2012, 1:54 p.m. UTC | #1
On 07/13/2012 02:32 PM, y@pengutronix.de :
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> This prepares of_device_id.data becoming const. Without this change
> the following warning would occur:
> 
> 	drivers/dma/at_hdmac.c: In function 'at_dma_get_driver_data':
> 	drivers/dma/at_hdmac.c:1228: warning: return discards qualifiers from pointer target type
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Vinod Koul <vinod.koul@intel.com>
> ---
>  drivers/dma/at_hdmac.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index 7292aa8..7e9d265 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -1217,7 +1217,7 @@ static const struct platform_device_id atdma_devtypes[] = {
>  	}
>  };
>  
> -static inline struct at_dma_platform_data * __init at_dma_get_driver_data(
> +static inline const struct at_dma_platform_data * __init at_dma_get_driver_data(
>  						struct platform_device *pdev)
>  {
>  	if (pdev->dev.of_node) {
> @@ -1255,7 +1255,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
>  	int			irq;
>  	int			err;
>  	int			i;
> -	struct at_dma_platform_data *plat_dat;
> +	const struct at_dma_platform_data *plat_dat;
>  
>  	/* setup platform data for each SoC */
>  	dma_cap_set(DMA_MEMCPY, at91sam9rl_config.cap_mask);
>
Vinod Koul July 16, 2012, 6:38 a.m. UTC | #2
On Fri, 2012-07-13 at 14:32 +0200, y@pengutronix.de wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> This prepares of_device_id.data becoming const. Without this change
> the following warning would occur:
> 
> 	drivers/dma/at_hdmac.c: In function 'at_dma_get_driver_data':
> 	drivers/dma/at_hdmac.c:1228: warning: return discards qualifiers from pointer target type
Applied, thanks.

By now, you should know git-send-mail asks for sender name and don't hit
"y". Bitten once, am careful about it :D
diff mbox

Patch

diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 7292aa8..7e9d265 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1217,7 +1217,7 @@  static const struct platform_device_id atdma_devtypes[] = {
 	}
 };
 
-static inline struct at_dma_platform_data * __init at_dma_get_driver_data(
+static inline const struct at_dma_platform_data * __init at_dma_get_driver_data(
 						struct platform_device *pdev)
 {
 	if (pdev->dev.of_node) {
@@ -1255,7 +1255,7 @@  static int __init at_dma_probe(struct platform_device *pdev)
 	int			irq;
 	int			err;
 	int			i;
-	struct at_dma_platform_data *plat_dat;
+	const struct at_dma_platform_data *plat_dat;
 
 	/* setup platform data for each SoC */
 	dma_cap_set(DMA_MEMCPY, at91sam9rl_config.cap_mask);