[PATCH] RFC: make struct platform_driver.id_table const

Ben Dooks ben-linux at fluff.org
Sun Jan 24 20:34:21 EST 2010


On Fri, Jan 22, 2010 at 06:03:57PM +0100, Uwe Kleine-König wrote:
> This fixes a warning on several pxa based machines:
> 
> 	arch/arm/mach-pxa/ssp.c:475: warning: initialization discards qualifiers from pointer target type

this looks sane to me.
 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> Cc: Eric Miao <eric.miao at marvell.com>
> Cc: Greg Kroah-Hartman <gregkh at suse.de>
> ---
>  drivers/base/platform.c         |    2 +-
>  include/linux/platform_device.h |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index 58efaf2..962246c 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -578,7 +578,7 @@ static int platform_uevent(struct device *dev, struct kobj_uevent_env *env)
>  }
>  
>  static const struct platform_device_id *platform_match_id(
> -			struct platform_device_id *id,
> +			const struct platform_device_id *id,
>  			struct platform_device *pdev)
>  {
>  	while (id->name[0]) {
> diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
> index 71ff887..3a6201e 100644
> --- a/include/linux/platform_device.h
> +++ b/include/linux/platform_device.h
> @@ -21,7 +21,7 @@ struct platform_device {
>  	u32		num_resources;
>  	struct resource	* resource;
>  
> -	struct platform_device_id	*id_entry;
> +	const struct platform_device_id	*id_entry;
>  
>  	/* arch specific additions */
>  	struct pdev_archdata	archdata;
> @@ -62,7 +62,7 @@ struct platform_driver {
>  	int (*suspend)(struct platform_device *, pm_message_t state);
>  	int (*resume)(struct platform_device *);
>  	struct device_driver driver;
> -	struct platform_device_id *id_table;
> +	const struct platform_device_id *id_table;
>  };
>  
>  extern int platform_driver_register(struct platform_driver *);
> -- 
> 1.6.6
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.




More information about the linux-arm-kernel mailing list