summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/timberdale.c
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-06-02 19:43:33 +0800
committerLee Jones <lee.jones@linaro.org>2021-06-15 13:02:18 +0100
commitae7955f7250efedb959391e73018b607a51e78b2 (patch)
tree71f7d950db672908f470d050a0715ec8e08b788a /drivers/mfd/timberdale.c
parent47ed390bac52c5814c03253d15a6ffe85ef69ba5 (diff)
downloadlinux-stable-ae7955f7250efedb959391e73018b607a51e78b2.tar.gz
linux-stable-ae7955f7250efedb959391e73018b607a51e78b2.tar.bz2
linux-stable-ae7955f7250efedb959391e73018b607a51e78b2.zip
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: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/timberdale.c')
-rw-r--r--drivers/mfd/timberdale.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index faecbca6dba3..9393ee60a656 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -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,
- char *buf)
+static ssize_t fw_ver_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
{
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,
priv->fw.config);
}
-static DEVICE_ATTR(fw_ver, S_IRUGO, show_fw_ver, NULL);
+static DEVICE_ATTR_RO(fw_ver);
/*--------------------------------------------------------------------------*/