mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 15:13:44 -04:00
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>
This commit is contained in:
committed by
Heiko Carstens
parent
fd2a41d07b
commit
82df96d849
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user