aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorye xingchen <[email protected]>2022-09-23 06:32:33 +0000
committerHans de Goede <[email protected]>2022-09-27 15:05:32 +0200
commitbbfa903b4f9a0a76719f386367fed5e64187f577 (patch)
treeab096995a94d427a9e56387b475e45b16943679a
parenta283781baa0c38a8e9c7b26780e3ee7a91a4f186 (diff)
platform/x86: dell-smbios-base: Use sysfs_emit()
Replace the open-code with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
-rw-r--r--drivers/platform/x86/dell/dell-smbios-base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index fc086b66f70b..e61bfaf8b5c4 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -441,7 +441,7 @@ static ssize_t location_show(struct device *dev,
i = match_attribute(dev, attr);
if (i > 0)
- return scnprintf(buf, PAGE_SIZE, "%08x", da_tokens[i].location);
+ return sysfs_emit(buf, "%08x", da_tokens[i].location);
return 0;
}
@@ -455,7 +455,7 @@ static ssize_t value_show(struct device *dev,
i = match_attribute(dev, attr);
if (i > 0)
- return scnprintf(buf, PAGE_SIZE, "%08x", da_tokens[i].value);
+ return sysfs_emit(buf, "%08x", da_tokens[i].value);
return 0;
}