Commit 82df96d8 authored by Sven Schnelle's avatar Sven Schnelle Committed by Heiko Carstens

s390/raw3270: use DEVICE_ATTR_RO() for sysfs attributes

Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent fd2a41d0
......@@ -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,
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,
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,
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment