PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions
[linux-2.6-microblaze.git] / drivers / pci / pci-label.c
index 94b59e3..0c64465 100644 (file)
@@ -178,11 +178,11 @@ static int dsm_get_label(struct device *dev, char *buf,
                 * this entry must return a null string.
                 */
                if (attr == ACPI_ATTR_INDEX_SHOW) {
-                       len = scnprintf(buf, PAGE_SIZE, "%llu\n", tmp->integer.value);
+                       len = sysfs_emit(buf, "%llu\n", tmp->integer.value);
                } else if (attr == ACPI_ATTR_LABEL_SHOW) {
                        if (tmp[1].type == ACPI_TYPE_STRING)
-                               len = scnprintf(buf, PAGE_SIZE, "%s\n",
-                                         tmp[1].string.pointer);
+                               len = sysfs_emit(buf, "%s\n",
+                                                tmp[1].string.pointer);
                        else if (tmp[1].type == ACPI_TYPE_BUFFER)
                                len = dsm_label_utf16s_to_utf8s(tmp + 1, buf);
                }