]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/acpi/acpi_pad.c
cpumask: factor out show_cpumap into separate helper function
[mirror_ubuntu-artful-kernel.git] / drivers / acpi / acpi_pad.c
index f148a0580e0404b64b9fe1a104e05c0c1aaa498b..c7b105c0e1d377991f1e324fae161535e01efe27 100644 (file)
@@ -350,12 +350,10 @@ static ssize_t acpi_pad_idlecpus_store(struct device *dev,
 static ssize_t acpi_pad_idlecpus_show(struct device *dev,
        struct device_attribute *attr, char *buf)
 {
-       int n = 0;
-       n = cpumask_scnprintf(buf, PAGE_SIZE-2, to_cpumask(pad_busy_cpus_bits));
-       buf[n++] = '\n';
-       buf[n] = '\0';
-       return n;
+       return cpumap_print_to_pagebuf(false, buf,
+                                      to_cpumask(pad_busy_cpus_bits));
 }
+
 static DEVICE_ATTR(idlecpus, S_IRUGO|S_IWUSR,
        acpi_pad_idlecpus_show,
        acpi_pad_idlecpus_store);