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 <scottwood@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Scott Wood
2006-12-04 14:57:19 -08:00
committed by Greg Kroah-Hartman
parent c63e07834b
commit 6eefd34fdc
2 changed files with 2 additions and 2 deletions

View File

@@ -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;