Skip to content

Commit

Permalink
Driver core: make struct platform_driver.id_table const
Browse files Browse the repository at this point in the history
This fixes a warning on several pxa based machines:

	arch/arm/mach-pxa/ssp.c:475: warning: initialization discards qualifiers from pointer target type

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Vikram Dhillon <dhillonv10@gmail.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Uwe Kleine-König authored and Greg Kroah-Hartman committed Mar 8, 2010
1 parent 52cf25d commit 831fad2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,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]) {
Expand Down
2 changes: 1 addition & 1 deletion include/linux/platform_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down

0 comments on commit 831fad2

Please sign in to comment.