From 6eefd34fdcbd34e2cddb8b7da26d838367591954 Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Mon, 4 Dec 2006 14:57:19 -0800 Subject: Driver core: Make platform_device_add_data accept a const pointer platform_device_add_data() makes a copy of the data that is given to it, and thus the parameter can be const. This removes a warning when data from get_property() on powerpc is handed to platform_device_add_data(), as get_property() returns a const pointer. Signed-off-by: Scott Wood Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/base/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 0338289f9b5..f9c903ba9fc 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(platform_device_add_resources); * pointer. The memory associated with the platform data will be freed * when the platform device is released. */ -int platform_device_add_data(struct platform_device *pdev, void *data, size_t size) +int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size) { void *d; -- cgit v1.2.3