diff options
author | Thomas Renninger <trenn@suse.de> | 2010-10-01 04:54:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-10-01 19:28:51 -0400 |
commit | 620e112cfe1c9281c176de8ad1a7691c4eb4950d (patch) | |
tree | b7a2b5b389396ac1b90f7d586af568044df7804f /drivers/acpi | |
parent | 2b2ae7c7f8e25043793042eb9df88aa875b4cff8 (diff) |
ACPI/PNP: A HID value of an object never changes -> make it const
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/button.c | 4 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 1575a9b51f1d..71ef9cd0735f 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -338,7 +338,8 @@ static int acpi_button_add(struct acpi_device *device) | |||
338 | { | 338 | { |
339 | struct acpi_button *button; | 339 | struct acpi_button *button; |
340 | struct input_dev *input; | 340 | struct input_dev *input; |
341 | char *hid, *name, *class; | 341 | const char *hid = acpi_device_hid(device); |
342 | char *name, *class; | ||
342 | int error; | 343 | int error; |
343 | 344 | ||
344 | button = kzalloc(sizeof(struct acpi_button), GFP_KERNEL); | 345 | button = kzalloc(sizeof(struct acpi_button), GFP_KERNEL); |
@@ -353,7 +354,6 @@ static int acpi_button_add(struct acpi_device *device) | |||
353 | goto err_free_button; | 354 | goto err_free_button; |
354 | } | 355 | } |
355 | 356 | ||
356 | hid = acpi_device_hid(device); | ||
357 | name = acpi_device_name(device); | 357 | name = acpi_device_name(device); |
358 | class = acpi_device_class(device); | 358 | class = acpi_device_class(device); |
359 | 359 | ||
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 81aec8d66fd0..6155eeb2e89a 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -26,8 +26,7 @@ extern struct acpi_device *acpi_root; | |||
26 | 26 | ||
27 | #define ACPI_IS_ROOT_DEVICE(device) (!(device)->parent) | 27 | #define ACPI_IS_ROOT_DEVICE(device) (!(device)->parent) |
28 | 28 | ||
29 | /* Should be const */ | 29 | static const char *dummy_hid = "device"; |
30 | static char* dummy_hid = "device"; | ||
31 | 30 | ||
32 | static LIST_HEAD(acpi_device_list); | 31 | static LIST_HEAD(acpi_device_list); |
33 | static LIST_HEAD(acpi_bus_id_list); | 32 | static LIST_HEAD(acpi_bus_id_list); |
@@ -1021,7 +1020,7 @@ static int acpi_dock_match(struct acpi_device *device) | |||
1021 | return acpi_get_handle(device->handle, "_DCK", &tmp); | 1020 | return acpi_get_handle(device->handle, "_DCK", &tmp); |
1022 | } | 1021 | } |
1023 | 1022 | ||
1024 | char *acpi_device_hid(struct acpi_device *device) | 1023 | const char *acpi_device_hid(struct acpi_device *device) |
1025 | { | 1024 | { |
1026 | struct acpi_hardware_id *hid; | 1025 | struct acpi_hardware_id *hid; |
1027 | 1026 | ||