drivers_base: make argument to platform_device_register_full const
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 8 Dec 2011 21:53:29 +0000 (22:53 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 10 Dec 2011 00:23:49 +0000 (16:23 -0800)
platform_device_register_full doesn't modify *pdevinfo so it can be
marked as const without further adaptions.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/platform.c
include/linux/platform_device.h

index 7a24895543e7c24bdc8d62d3728c9bfc7f98b3bc..a7c06374062e61c0f57388df40f332b106ddd628 100644 (file)
@@ -383,7 +383,7 @@ EXPORT_SYMBOL_GPL(platform_device_unregister);
  * Returns &struct platform_device pointer on success, or ERR_PTR() on error.
  */
 struct platform_device *platform_device_register_full(
-               struct platform_device_info *pdevinfo)
+               const struct platform_device_info *pdevinfo)
 {
        int ret = -ENOMEM;
        struct platform_device *pdev;
index 165a8d1753709f05f8009ba8b6897864b75a74ba..5622fa24e97ba21a44d6bbb5c65fd435a63f3333 100644 (file)
@@ -63,7 +63,7 @@ struct platform_device_info {
                u64 dma_mask;
 };
 extern struct platform_device *platform_device_register_full(
-               struct platform_device_info *pdevinfo);
+               const struct platform_device_info *pdevinfo);
 
 /**
  * platform_device_register_resndata - add a platform-level device with