diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-08-05 22:50:27 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-08-05 22:50:27 +0200 |
commit | bf74dc001cc08cc56a6cc266564e0c32d0fcebad (patch) | |
tree | bf892150bfe6117a79238ad3fbfb063205183a3e | |
parent | 8b80c0f187d8711fede71b7bd6fb80cb76bb8be9 (diff) | |
parent | a5f95da9fb2a0b228b3bab19d35850af3e9a74b2 (diff) | |
download | linux-bf74dc001cc08cc56a6cc266564e0c32d0fcebad.tar.gz linux-bf74dc001cc08cc56a6cc266564e0c32d0fcebad.tar.bz2 linux-bf74dc001cc08cc56a6cc266564e0c32d0fcebad.zip |
Merge branch 'acpi-pnp'
* acpi-pnp:
ACPI / PNP: Replace faulty is_hex_digit() by isxdigit()
ACPI / PNP: Fix acpi_pnp_match()
-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 @@ #include <linux/acpi.h> #include <linux/module.h> +#include <linux/ctype.h> static const struct acpi_device_id acpi_pnp_device_ids[] = { /* soc_button_array */ @@ -320,11 +321,6 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = { {""}, }; -static bool is_hex_digit(char c) -{ - return (c >= 0 && c <= '9') || (c >= 'A' && c <= 'F'); -} - static bool matching_id(char *idstr, char *list_id) { int i; @@ -335,7 +331,7 @@ static bool matching_id(char *idstr, char *list_id) for (i = 3; i < 7; i++) { char c = toupper(idstr[i]); - if (!is_hex_digit(c) + if (!isxdigit(c) || (list_id[i] != 'X' && c != toupper(list_id[i]))) return false; } |