diff options
| -rw-r--r-- | drivers/acpi/acpi_pnp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c index 4ddb0dca56f6..996fa1959eea 100644 --- a/drivers/acpi/acpi_pnp.c +++ b/drivers/acpi/acpi_pnp.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/acpi.h> | 13 | #include <linux/acpi.h> |
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/ctype.h> | ||
| 15 | 16 | ||
| 16 | static const struct acpi_device_id acpi_pnp_device_ids[] = { | 17 | static const struct acpi_device_id acpi_pnp_device_ids[] = { |
| 17 | /* soc_button_array */ | 18 | /* soc_button_array */ |
| @@ -320,11 +321,6 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = { | |||
| 320 | {""}, | 321 | {""}, |
| 321 | }; | 322 | }; |
| 322 | 323 | ||
| 323 | static bool is_hex_digit(char c) | ||
| 324 | { | ||
| 325 | return (c >= 0 && c <= '9') || (c >= 'A' && c <= 'F'); | ||
| 326 | } | ||
| 327 | |||
| 328 | static bool matching_id(char *idstr, char *list_id) | 324 | static bool matching_id(char *idstr, char *list_id) |
| 329 | { | 325 | { |
| 330 | int i; | 326 | int i; |
| @@ -335,7 +331,7 @@ static bool matching_id(char *idstr, char *list_id) | |||
| 335 | for (i = 3; i < 7; i++) { | 331 | for (i = 3; i < 7; i++) { |
| 336 | char c = toupper(idstr[i]); | 332 | char c = toupper(idstr[i]); |
| 337 | 333 | ||
| 338 | if (!is_hex_digit(c) | 334 | if (!isxdigit(c) |
| 339 | || (list_id[i] != 'X' && c != toupper(list_id[i]))) | 335 | || (list_id[i] != 'X' && c != toupper(list_id[i]))) |
| 340 | return false; | 336 | return false; |
| 341 | } | 337 | } |
