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>
This commit is contained in:
parent
6ff33f3902
commit
636c19d389
|
@ -316,7 +316,7 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = {
|
||||||
{""},
|
{""},
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool matching_id(char *idstr, char *list_id)
|
static bool matching_id(const char *idstr, const char *list_id)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ static bool matching_id(char *idstr, char *list_id)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool acpi_pnp_match(char *idstr, const struct acpi_device_id **matchid)
|
static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matchid)
|
||||||
{
|
{
|
||||||
const struct acpi_device_id *devid;
|
const struct acpi_device_id *devid;
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile(
|
||||||
struct acpi_scan_handler {
|
struct acpi_scan_handler {
|
||||||
const struct acpi_device_id *ids;
|
const struct acpi_device_id *ids;
|
||||||
struct list_head list_node;
|
struct list_head list_node;
|
||||||
bool (*match)(char *idstr, const struct acpi_device_id **matchid);
|
bool (*match)(const char *idstr, const struct acpi_device_id **matchid);
|
||||||
int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id);
|
int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id);
|
||||||
void (*detach)(struct acpi_device *dev);
|
void (*detach)(struct acpi_device *dev);
|
||||||
void (*bind)(struct device *phys_dev);
|
void (*bind)(struct device *phys_dev);
|
||||||
|
|
Loading…
Reference in New Issue