summaryrefslogtreecommitdiff
path: root/drivers/s390/char
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2022-12-05 11:02:16 +0300
committerHeiko Carstens <hca@linux.ibm.com>2023-01-09 16:34:03 +0300
commit82df96d849147c72013639134de21296b4b19d83 (patch)
tree9217e430404f7583b7e33ffb63a527ac8f19ca71 /drivers/s390/char
parentfd2a41d07b2f8be0f490f8f78280e574eb9bda5a (diff)
downloadlinux-82df96d849147c72013639134de21296b4b19d83.tar.xz
s390/raw3270: use DEVICE_ATTR_RO() for sysfs attributes
Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r--drivers/s390/char/raw3270.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index 1c21addfe0e1..130295fd1253 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,