ACPI: platform: Constify properties parameter in acpi_create_platform_device()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 23 Feb 2022 23:56:20 +0000 (01:56 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 1 Mar 2022 19:36:34 +0000 (20:36 +0100)
Properties are not and should not be changed in the callee, hence constify
properties parameter in acpi_create_platform_device().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_platform.c
include/linux/acpi.h

index 78d6212..de3cbf1 100644 (file)
@@ -95,7 +95,7 @@ static void acpi_platform_fill_resource(struct acpi_device *adev,
  * Name of the platform device will be the same as @adev's.
  */
 struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
-                                       struct property_entry *properties)
+                                                   const struct property_entry *properties)
 {
        struct platform_device *pdev = NULL;
        struct platform_device_info pdevinfo;
index 6274758..9ac5453 100644 (file)
@@ -691,7 +691,7 @@ int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *);
 int acpi_device_modalias(struct device *, char *, int);
 
 struct platform_device *acpi_create_platform_device(struct acpi_device *,
-                                                   struct property_entry *);
+                                                   const struct property_entry *);
 #define ACPI_PTR(_ptr) (_ptr)
 
 static inline void acpi_device_set_enumerated(struct acpi_device *adev)
@@ -930,7 +930,7 @@ static inline int acpi_device_modalias(struct device *dev,
 
 static inline struct platform_device *
 acpi_create_platform_device(struct acpi_device *adev,
-                           struct property_entry *properties)
+                           const struct property_entry *properties)
 {
        return NULL;
 }