diff options
Diffstat (limited to 'drivers/acpi/acpi_pad.c')
-rw-r--r-- | drivers/acpi/acpi_pad.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 6afceb3d403..a43fa1a57d5 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c | |||
@@ -298,7 +298,7 @@ static ssize_t acpi_pad_rrtime_store(struct device *dev, | |||
298 | static ssize_t acpi_pad_rrtime_show(struct device *dev, | 298 | static ssize_t acpi_pad_rrtime_show(struct device *dev, |
299 | struct device_attribute *attr, char *buf) | 299 | struct device_attribute *attr, char *buf) |
300 | { | 300 | { |
301 | return scnprintf(buf, PAGE_SIZE, "%d", round_robin_time); | 301 | return scnprintf(buf, PAGE_SIZE, "%d\n", round_robin_time); |
302 | } | 302 | } |
303 | static DEVICE_ATTR(rrtime, S_IRUGO|S_IWUSR, | 303 | static DEVICE_ATTR(rrtime, S_IRUGO|S_IWUSR, |
304 | acpi_pad_rrtime_show, | 304 | acpi_pad_rrtime_show, |
@@ -321,7 +321,7 @@ static ssize_t acpi_pad_idlepct_store(struct device *dev, | |||
321 | static ssize_t acpi_pad_idlepct_show(struct device *dev, | 321 | static ssize_t acpi_pad_idlepct_show(struct device *dev, |
322 | struct device_attribute *attr, char *buf) | 322 | struct device_attribute *attr, char *buf) |
323 | { | 323 | { |
324 | return scnprintf(buf, PAGE_SIZE, "%d", idle_pct); | 324 | return scnprintf(buf, PAGE_SIZE, "%d\n", idle_pct); |
325 | } | 325 | } |
326 | static DEVICE_ATTR(idlepct, S_IRUGO|S_IWUSR, | 326 | static DEVICE_ATTR(idlepct, S_IRUGO|S_IWUSR, |
327 | acpi_pad_idlepct_show, | 327 | acpi_pad_idlepct_show, |
@@ -342,8 +342,11 @@ static ssize_t acpi_pad_idlecpus_store(struct device *dev, | |||
342 | static ssize_t acpi_pad_idlecpus_show(struct device *dev, | 342 | static ssize_t acpi_pad_idlecpus_show(struct device *dev, |
343 | struct device_attribute *attr, char *buf) | 343 | struct device_attribute *attr, char *buf) |
344 | { | 344 | { |
345 | return cpumask_scnprintf(buf, PAGE_SIZE, | 345 | int n = 0; |
346 | to_cpumask(pad_busy_cpus_bits)); | 346 | n = cpumask_scnprintf(buf, PAGE_SIZE-2, to_cpumask(pad_busy_cpus_bits)); |
347 | buf[n++] = '\n'; | ||
348 | buf[n] = '\0'; | ||
349 | return n; | ||
347 | } | 350 | } |
348 | static DEVICE_ATTR(idlecpus, S_IRUGO|S_IWUSR, | 351 | static DEVICE_ATTR(idlecpus, S_IRUGO|S_IWUSR, |
349 | acpi_pad_idlecpus_show, | 352 | acpi_pad_idlecpus_show, |
@@ -453,7 +456,7 @@ static void acpi_pad_notify(acpi_handle handle, u32 event, | |||
453 | dev_name(&device->dev), event, 0); | 456 | dev_name(&device->dev), event, 0); |
454 | break; | 457 | break; |
455 | default: | 458 | default: |
456 | printk(KERN_WARNING"Unsupported event [0x%x]\n", event); | 459 | printk(KERN_WARNING "Unsupported event [0x%x]\n", event); |
457 | break; | 460 | break; |
458 | } | 461 | } |
459 | } | 462 | } |