summaryrefslogtreecommitdiff
path: root/drivers/s390/char
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2022-11-19 20:53:49 +0300
committerAlexander Gordeev <agordeev@linux.ibm.com>2022-11-29 16:17:04 +0300
commita086c53de982d6ae3f1e7e3c0f94efa66743b333 (patch)
tree6ab2f706c3dd7c8758d478c60b55872c06a78700 /drivers/s390/char
parent2473be453c9023bafd6cc785a7f2ecd0eabda2fd (diff)
downloadlinux-a086c53de982d6ae3f1e7e3c0f94efa66743b333.tar.xz
s390/sclp: convert to use sysfs_emit()
Use sysfs_emit() for all sclp sysfs show functions, which is the current standard way to generate output strings. Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r--drivers/s390/char/sclp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c
index 05f6951095c1..f0696f05a186 100644
--- a/drivers/s390/char/sclp.c
+++ b/drivers/s390/char/sclp.c
@@ -1200,21 +1200,21 @@ static struct notifier_block sclp_reboot_notifier = {
static ssize_t con_pages_show(struct device_driver *dev, char *buf)
{
- return sprintf(buf, "%i\n", sclp_console_pages);
+ return sysfs_emit(buf, "%i\n", sclp_console_pages);
}
static DRIVER_ATTR_RO(con_pages);
static ssize_t con_drop_show(struct device_driver *dev, char *buf)
{
- return sprintf(buf, "%i\n", sclp_console_drop);
+ return sysfs_emit(buf, "%i\n", sclp_console_drop);
}
static DRIVER_ATTR_RO(con_drop);
static ssize_t con_full_show(struct device_driver *dev, char *buf)
{
- return sprintf(buf, "%lu\n", sclp_console_full);
+ return sysfs_emit(buf, "%lu\n", sclp_console_full);
}
static DRIVER_ATTR_RO(con_full);