projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a283781
)
platform/x86: dell-smbios-base: Use sysfs_emit()
author
ye xingchen
<ye.xingchen@zte.com.cn>
Fri, 23 Sep 2022 06:32:33 +0000
(06:32 +0000)
committer
Hans de Goede
<hdegoede@redhat.com>
Tue, 27 Sep 2022 13:05:32 +0000
(15:05 +0200)
Replace the open-code with sysfs_emit() to simplify the code.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link:
https://lore.kernel.org/r/20220923063233.239091-1-ye.xingchen@zte.com.cn
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/dell/dell-smbios-base.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/dell/dell-smbios-base.c
b/drivers/platform/x86/dell/dell-smbios-base.c
index fc086b66f70b377374dcd71627f2efb0769c8e1d..e61bfaf8b5c48faf8fdf2df15cf0faa140b5869e 100644
(file)
--- 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 s
cnprintf(buf, PAGE_SIZE
, "%08x", da_tokens[i].location);
+ return s
ysfs_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 s
cnprintf(buf, PAGE_SIZE
, "%08x", da_tokens[i].value);
+ return s
ysfs_emit(buf
, "%08x", da_tokens[i].value);
return 0;
}