Skip to content

Commit

Permalink
ACPI: strict_strtoul() and printk() cleanup in acpi_pad
Browse files Browse the repository at this point in the history
Replace a few calls to strict_strtoul() in acpi_pad.c with kstrtoul()
and use pr_warn() instead of printk() in the same file.

[rjw: Modified the subject and changelog.]
Signed-off-by: Josh Taylor <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
Josh authored and rafaeljw committed Nov 14, 2012
1 parent 8ab0ab2 commit 73d4511
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/acpi/acpi_pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static ssize_t acpi_pad_rrtime_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
unsigned long num;
if (strict_strtoul(buf, 0, &num))
if (kstrtoul(buf, 0, &num))
return -EINVAL;
if (num < 1 || num >= 100)
return -EINVAL;
Expand All @@ -309,7 +309,7 @@ static ssize_t acpi_pad_idlepct_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
unsigned long num;
if (strict_strtoul(buf, 0, &num))
if (kstrtoul(buf, 0, &num))
return -EINVAL;
if (num < 1 || num >= 100)
return -EINVAL;
Expand All @@ -332,7 +332,7 @@ static ssize_t acpi_pad_idlecpus_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
unsigned long num;
if (strict_strtoul(buf, 0, &num))
if (kstrtoul(buf, 0, &num))
return -EINVAL;
mutex_lock(&isolated_cpus_lock);
acpi_pad_idle_cpus(num);
Expand Down Expand Up @@ -457,7 +457,7 @@ static void acpi_pad_notify(acpi_handle handle, u32 event,
dev_name(&device->dev), event, 0);
break;
default:
printk(KERN_WARNING "Unsupported event [0x%x]\n", event);
pr_warn("Unsupported event [0x%x]\n", event);
break;
}
}
Expand Down

0 comments on commit 73d4511

Please sign in to comment.