[PATCH 13/25] macintosh/mediabay: add a const qualifier

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Sep 5 12:40:17 EST 2012


On Mon, 2012-07-23 at 11:13 +0200, Uwe Kleine-König wrote:
> This prepares *of_device_id.data becoming const. Without this change
> the following warning would occur:
> 
> 	drivers/macintosh/mediabay.c: In function 'media_bay_attach':
> 	drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> ---

Ack all of these assuming you test built (I didn't). Do you need me to
carry any of this via the powerpc tree ?

Cheers,
Ben.

>  drivers/macintosh/mediabay.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
> index 831d751..54bf584 100644
> --- a/drivers/macintosh/mediabay.c
> +++ b/drivers/macintosh/mediabay.c
> @@ -63,7 +63,7 @@ struct media_bay_info {
>  	int				value_count;
>  	int				timer;
>  	struct macio_dev		*mdev;
> -	struct mb_ops*			ops;
> +	const struct mb_ops*		ops;
>  	int				index;
>  	int				cached_gpio;
>  	int				sleeping;




More information about the Linuxppc-dev mailing list