diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-09-09 17:59:41 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-09-14 20:56:29 -0400 |
commit | 636c19d38920caee61d694ef306d110d33935038 (patch) | |
tree | f93552994a1598c442395e9f79a9823d50a46ad8 | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) |
ACPI / scan: constify first argument of struct acpi_scan_handler::match
One wouldn't expect a "match" function modify the string it searches
for, and indeed the only instance of the struct
acpi_scan_handler::match callback, acpi_pnp_match, can easily be
changed. While there, update its helper matching_id().
This is also preparation for constifying struct acpi_hardware_id::id.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpi_pnp.c | 4 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c index c58940b231d6..48fc3ad13a4b 100644 --- a/drivers/acpi/acpi_pnp.c +++ b/drivers/acpi/acpi_pnp.c | |||
@@ -316,7 +316,7 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = { | |||
316 | {""}, | 316 | {""}, |
317 | }; | 317 | }; |
318 | 318 | ||
319 | static bool matching_id(char *idstr, char *list_id) | 319 | static bool matching_id(const char *idstr, const char *list_id) |
320 | { | 320 | { |
321 | int i; | 321 | int i; |
322 | 322 | ||
@@ -333,7 +333,7 @@ static bool matching_id(char *idstr, char *list_id) | |||
333 | return true; | 333 | return true; |
334 | } | 334 | } |
335 | 335 | ||
336 | static bool acpi_pnp_match(char *idstr, const struct acpi_device_id **matchid) | 336 | static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matchid) |
337 | { | 337 | { |
338 | const struct acpi_device_id *devid; | 338 | const struct acpi_device_id *devid; |
339 | 339 | ||
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 5ba8fb64f664..9a1b46c64fc1 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -129,7 +129,7 @@ static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile( | |||
129 | struct acpi_scan_handler { | 129 | struct acpi_scan_handler { |
130 | const struct acpi_device_id *ids; | 130 | const struct acpi_device_id *ids; |
131 | struct list_head list_node; | 131 | struct list_head list_node; |
132 | bool (*match)(char *idstr, const struct acpi_device_id **matchid); | 132 | bool (*match)(const char *idstr, const struct acpi_device_id **matchid); |
133 | int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id); | 133 | int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id); |
134 | void (*detach)(struct acpi_device *dev); | 134 | void (*detach)(struct acpi_device *dev); |
135 | void (*bind)(struct device *phys_dev); | 135 | void (*bind)(struct device *phys_dev); |