From 82df96d849147c72013639134de21296b4b19d83 Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Mon, 5 Dec 2022 09:02:16 +0100 Subject: [PATCH] s390/raw3270: use DEVICE_ATTR_RO() for sysfs attributes Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens --- drivers/s390/char/raw3270.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 1c21add..130295f 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c @@ -1095,30 +1095,30 @@ static int raw3270_probe(struct ccw_device *cdev) /* * Additional attributes for a 3270 device */ -static ssize_t raw3270_model_show(struct device *dev, struct device_attribute *attr, - char *buf) +static ssize_t model_show(struct device *dev, struct device_attribute *attr, + char *buf) { return sysfs_emit(buf, "%i\n", ((struct raw3270 *)dev_get_drvdata(dev))->model); } -static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL); +static DEVICE_ATTR_RO(model); -static ssize_t raw3270_rows_show(struct device *dev, struct device_attribute *attr, - char *buf) +static ssize_t rows_show(struct device *dev, struct device_attribute *attr, + char *buf) { return sysfs_emit(buf, "%i\n", ((struct raw3270 *)dev_get_drvdata(dev))->rows); } -static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL); +static DEVICE_ATTR_RO(rows); static ssize_t -raw3270_columns_show(struct device *dev, struct device_attribute *attr, - char *buf) +columns_show(struct device *dev, struct device_attribute *attr, + char *buf) { return sysfs_emit(buf, "%i\n", ((struct raw3270 *)dev_get_drvdata(dev))->cols); } -static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL); +static DEVICE_ATTR_RO(columns); static struct attribute *raw3270_attrs[] = { &dev_attr_model.attr, -- 2.7.4