Commit ae7955f7 authored by Zhen Lei's avatar Zhen Lei Committed by Lee Jones

mfd: timberdale: Use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes
the code a bit shorter and easier to read.
Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 47ed390b
...@@ -623,8 +623,8 @@ static const struct mfd_cell timberdale_cells_bar2[] = { ...@@ -623,8 +623,8 @@ static const struct mfd_cell timberdale_cells_bar2[] = {
}, },
}; };
static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr, static ssize_t fw_ver_show(struct device *dev,
char *buf) struct device_attribute *attr, char *buf)
{ {
struct timberdale_device *priv = dev_get_drvdata(dev); struct timberdale_device *priv = dev_get_drvdata(dev);
...@@ -632,7 +632,7 @@ static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr, ...@@ -632,7 +632,7 @@ static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr,
priv->fw.config); priv->fw.config);
} }
static DEVICE_ATTR(fw_ver, S_IRUGO, show_fw_ver, NULL); static DEVICE_ATTR_RO(fw_ver);
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
......
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