ACPI / scan: constify struct acpi_hardware_id::id
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Wed, 9 Sep 2015 21:59:42 +0000 (23:59 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 15 Sep 2015 00:57:55 +0000 (02:57 +0200)
This is preparation for using kstrdup_const to initialize that member.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c
drivers/pnp/pnpacpi/core.c
include/acpi/acpi_bus.h

index 01136b8790381ccff5afc259e47643c338914740..a3eaf20807072b0357a7841195d611abf59ec19a 100644 (file)
@@ -1472,7 +1472,7 @@ bool acpi_device_is_present(struct acpi_device *adev)
 }
 
 static bool acpi_scan_handler_matching(struct acpi_scan_handler *handler,
-                                      char *idstr,
+                                      const char *idstr,
                                       const struct acpi_device_id **matchid)
 {
        const struct acpi_device_id *devid;
@@ -1491,7 +1491,7 @@ static bool acpi_scan_handler_matching(struct acpi_scan_handler *handler,
        return false;
 }
 
-static struct acpi_scan_handler *acpi_scan_match_handler(char *idstr,
+static struct acpi_scan_handler *acpi_scan_match_handler(const char *idstr,
                                        const struct acpi_device_id **matchid)
 {
        struct acpi_scan_handler *handler;
index 5153d1d69aee8e0472c21ec63ff393f6fb9b7682..9113876487edd43037038357726208dd828e9a2a 100644 (file)
@@ -207,7 +207,7 @@ struct pnp_protocol pnpacpi_protocol = {
 };
 EXPORT_SYMBOL(pnpacpi_protocol);
 
-static char *__init pnpacpi_get_id(struct acpi_device *device)
+static const char *__init pnpacpi_get_id(struct acpi_device *device)
 {
        struct acpi_hardware_id *id;
 
@@ -222,7 +222,7 @@ static char *__init pnpacpi_get_id(struct acpi_device *device)
 static int __init pnpacpi_add_device(struct acpi_device *device)
 {
        struct pnp_dev *dev;
-       char *pnpid;
+       const char *pnpid;
        struct acpi_hardware_id *id;
        int error;
 
index 9a1b46c64fc184428092c24e4e19872ed4b1e0bf..fec002919b65f1067d44c5ce5cf46ac6d9e40a58 100644 (file)
@@ -227,7 +227,7 @@ typedef char acpi_device_class[20];
 
 struct acpi_hardware_id {
        struct list_head list;
-       char *id;
+       const char *id;
 };
 
 struct acpi_pnp_type {