Browse Source

ACPI / scan: constify struct acpi_hardware_id::id

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>
Rasmus Villemoes 10 years ago
parent
commit
844142c3f8
3 changed files with 5 additions and 5 deletions
  1. 2 2
      drivers/acpi/scan.c
  2. 2 2
      drivers/pnp/pnpacpi/core.c
  3. 1 1
      include/acpi/acpi_bus.h

+ 2 - 2
drivers/acpi/scan.c

@@ -1472,7 +1472,7 @@ bool acpi_device_is_present(struct acpi_device *adev)
 }
 }
 
 
 static bool acpi_scan_handler_matching(struct acpi_scan_handler *handler,
 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 **matchid)
 {
 {
 	const struct acpi_device_id *devid;
 	const struct acpi_device_id *devid;
@@ -1491,7 +1491,7 @@ static bool acpi_scan_handler_matching(struct acpi_scan_handler *handler,
 	return false;
 	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)
 					const struct acpi_device_id **matchid)
 {
 {
 	struct acpi_scan_handler *handler;
 	struct acpi_scan_handler *handler;

+ 2 - 2
drivers/pnp/pnpacpi/core.c

@@ -207,7 +207,7 @@ struct pnp_protocol pnpacpi_protocol = {
 };
 };
 EXPORT_SYMBOL(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;
 	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)
 static int __init pnpacpi_add_device(struct acpi_device *device)
 {
 {
 	struct pnp_dev *dev;
 	struct pnp_dev *dev;
-	char *pnpid;
+	const char *pnpid;
 	struct acpi_hardware_id *id;
 	struct acpi_hardware_id *id;
 	int error;
 	int error;
 
 

+ 1 - 1
include/acpi/acpi_bus.h

@@ -227,7 +227,7 @@ typedef char acpi_device_class[20];
 
 
 struct acpi_hardware_id {
 struct acpi_hardware_id {
 	struct list_head list;
 	struct list_head list;
-	char *id;
+	const char *id;
 };
 };
 
 
 struct acpi_pnp_type {
 struct acpi_pnp_type {