All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] mfd: use DEVICE_ATTR_* macro to simplify code
@ 2021-06-02 11:43 ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

DEVICE_ATTR_RO marks ReadOnly file, DEVICE_ATTR_RW marks ReadWrite file, etc..
it's clearer than DEVICE_ATTR.

Zhen Lei (9):
  mfd: wm831x: use DEVICE_ATTR_RO macro
  mfd: ucb1x00-assabet: use DEVICE_ATTR_RO macro
  mfd: timberdale: use DEVICE_ATTR_RO macro
  mfd: sm501: use DEVICE_ATTR_RO macro
  mfd: pcf50633: use DEVICE_ATTR_ADMIN_RO macro
  mfd: kempld-core: use DEVICE_ATTR_RO macro
  mfd: janz-cmodio: use DEVICE_ATTR_RO macro
  mfd: intel_soc_pmic_bxtwc: use DEVICE_ATTR_ADMIN_RW macro
  mfd: ab8500-core: use DEVICE_ATTR_RO/RW macro

 drivers/mfd/ab8500-core.c          | 33 +++++++++++++++---------------
 drivers/mfd/intel_soc_pmic_bxtwc.c | 20 +++++++++---------
 drivers/mfd/janz-cmodio.c          |  6 +++---
 drivers/mfd/kempld-core.c          | 19 ++++++++---------
 drivers/mfd/pcf50633-core.c        | 12 +++++------
 drivers/mfd/sm501.c                |  8 ++++----
 drivers/mfd/timberdale.c           |  6 +++---
 drivers/mfd/ucb1x00-assabet.c      |  2 +-
 drivers/mfd/wm831x-otp.c           |  6 +++---
 9 files changed, 55 insertions(+), 57 deletions(-)

-- 
2.26.0.106.g9fadedd



^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH 0/9] mfd: use DEVICE_ATTR_* macro to simplify code
@ 2021-06-02 11:43 ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

DEVICE_ATTR_RO marks ReadOnly file, DEVICE_ATTR_RW marks ReadWrite file, etc..
it's clearer than DEVICE_ATTR.

Zhen Lei (9):
  mfd: wm831x: use DEVICE_ATTR_RO macro
  mfd: ucb1x00-assabet: use DEVICE_ATTR_RO macro
  mfd: timberdale: use DEVICE_ATTR_RO macro
  mfd: sm501: use DEVICE_ATTR_RO macro
  mfd: pcf50633: use DEVICE_ATTR_ADMIN_RO macro
  mfd: kempld-core: use DEVICE_ATTR_RO macro
  mfd: janz-cmodio: use DEVICE_ATTR_RO macro
  mfd: intel_soc_pmic_bxtwc: use DEVICE_ATTR_ADMIN_RW macro
  mfd: ab8500-core: use DEVICE_ATTR_RO/RW macro

 drivers/mfd/ab8500-core.c          | 33 +++++++++++++++---------------
 drivers/mfd/intel_soc_pmic_bxtwc.c | 20 +++++++++---------
 drivers/mfd/janz-cmodio.c          |  6 +++---
 drivers/mfd/kempld-core.c          | 19 ++++++++---------
 drivers/mfd/pcf50633-core.c        | 12 +++++------
 drivers/mfd/sm501.c                |  8 ++++----
 drivers/mfd/timberdale.c           |  6 +++---
 drivers/mfd/ucb1x00-assabet.c      |  2 +-
 drivers/mfd/wm831x-otp.c           |  6 +++---
 9 files changed, 55 insertions(+), 57 deletions(-)

-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH 1/9] mfd: wm831x: use DEVICE_ATTR_RO macro
  2021-06-02 11:43 ` Zhen Lei
@ 2021-06-02 11:43   ` Zhen Lei
  -1 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/wm831x-otp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/wm831x-otp.c b/drivers/mfd/wm831x-otp.c
index afe59d52dd74d55..25f5d9fe33a18e2 100644
--- a/drivers/mfd/wm831x-otp.c
+++ b/drivers/mfd/wm831x-otp.c
@@ -38,8 +38,8 @@ static int wm831x_unique_id_read(struct wm831x *wm831x, char *id)
 	return 0;
 }
 
-static ssize_t wm831x_unique_id_show(struct device *dev,
-				     struct device_attribute *attr, char *buf)
+static ssize_t unique_id_show(struct device *dev,
+			      struct device_attribute *attr, char *buf)
 {
 	struct wm831x *wm831x = dev_get_drvdata(dev);
 	int rval;
@@ -52,7 +52,7 @@ static ssize_t wm831x_unique_id_show(struct device *dev,
 	return sprintf(buf, "%*phN\n", WM831X_UNIQUE_ID_LEN, id);
 }
 
-static DEVICE_ATTR(unique_id, 0444, wm831x_unique_id_show, NULL);
+static DEVICE_ATTR_RO(unique_id);
 
 int wm831x_otp_init(struct wm831x *wm831x)
 {
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 1/9] mfd: wm831x: use DEVICE_ATTR_RO macro
@ 2021-06-02 11:43   ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/wm831x-otp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/wm831x-otp.c b/drivers/mfd/wm831x-otp.c
index afe59d52dd74d55..25f5d9fe33a18e2 100644
--- a/drivers/mfd/wm831x-otp.c
+++ b/drivers/mfd/wm831x-otp.c
@@ -38,8 +38,8 @@ static int wm831x_unique_id_read(struct wm831x *wm831x, char *id)
 	return 0;
 }
 
-static ssize_t wm831x_unique_id_show(struct device *dev,
-				     struct device_attribute *attr, char *buf)
+static ssize_t unique_id_show(struct device *dev,
+			      struct device_attribute *attr, char *buf)
 {
 	struct wm831x *wm831x = dev_get_drvdata(dev);
 	int rval;
@@ -52,7 +52,7 @@ static ssize_t wm831x_unique_id_show(struct device *dev,
 	return sprintf(buf, "%*phN\n", WM831X_UNIQUE_ID_LEN, id);
 }
 
-static DEVICE_ATTR(unique_id, 0444, wm831x_unique_id_show, NULL);
+static DEVICE_ATTR_RO(unique_id);
 
 int wm831x_otp_init(struct wm831x *wm831x)
 {
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 2/9] mfd: ucb1x00-assabet: use DEVICE_ATTR_RO macro
  2021-06-02 11:43 ` Zhen Lei
@ 2021-06-02 11:43   ` Zhen Lei
  -1 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/ucb1x00-assabet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/ucb1x00-assabet.c b/drivers/mfd/ucb1x00-assabet.c
index ecc9e9fc331d6a3..6a389737c6153bc 100644
--- a/drivers/mfd/ucb1x00-assabet.c
+++ b/drivers/mfd/ucb1x00-assabet.c
@@ -28,7 +28,7 @@ static ssize_t name##_show(struct device *dev, struct device_attribute *attr, \
 	ucb1x00_adc_disable(ucb);				\
 	return sprintf(buf, "%d\n", val);			\
 }								\
-static DEVICE_ATTR(name,0444,name##_show,NULL)
+static DEVICE_ATTR_RO(name)
 
 UCB1X00_ATTR(vbatt, UCB_ADC_INP_AD1);
 UCB1X00_ATTR(vcharger, UCB_ADC_INP_AD0);
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 2/9] mfd: ucb1x00-assabet: use DEVICE_ATTR_RO macro
@ 2021-06-02 11:43   ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/ucb1x00-assabet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/ucb1x00-assabet.c b/drivers/mfd/ucb1x00-assabet.c
index ecc9e9fc331d6a3..6a389737c6153bc 100644
--- a/drivers/mfd/ucb1x00-assabet.c
+++ b/drivers/mfd/ucb1x00-assabet.c
@@ -28,7 +28,7 @@ static ssize_t name##_show(struct device *dev, struct device_attribute *attr, \
 	ucb1x00_adc_disable(ucb);				\
 	return sprintf(buf, "%d\n", val);			\
 }								\
-static DEVICE_ATTR(name,0444,name##_show,NULL)
+static DEVICE_ATTR_RO(name)
 
 UCB1X00_ATTR(vbatt, UCB_ADC_INP_AD1);
 UCB1X00_ATTR(vcharger, UCB_ADC_INP_AD0);
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 3/9] mfd: timberdale: use DEVICE_ATTR_RO macro
  2021-06-02 11:43 ` Zhen Lei
@ 2021-06-02 11:43   ` Zhen Lei
  -1 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/timberdale.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index faecbca6dba3dc0..9393ee60a656cd4 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);
 
 /*--------------------------------------------------------------------------*/
 
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 3/9] mfd: timberdale: use DEVICE_ATTR_RO macro
@ 2021-06-02 11:43   ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/timberdale.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index faecbca6dba3dc0..9393ee60a656cd4 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);
 
 /*--------------------------------------------------------------------------*/
 
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 4/9] mfd: sm501: use DEVICE_ATTR_RO macro
  2021-06-02 11:43 ` Zhen Lei
@ 2021-06-02 11:43   ` Zhen Lei
  -1 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/sm501.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 6d2f4a0a901dc08..bc0a2c38653e51c 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -1190,13 +1190,13 @@ static int sm501_register_gpio_i2c(struct sm501_devdata *sm,
 	return 0;
 }
 
-/* sm501_dbg_regs
+/* dbg_regs_show
  *
  * Debug attribute to attach to parent device to show core registers
 */
 
-static ssize_t sm501_dbg_regs(struct device *dev,
-			      struct device_attribute *attr, char *buff)
+static ssize_t dbg_regs_show(struct device *dev,
+			     struct device_attribute *attr, char *buff)
 {
 	struct sm501_devdata *sm = dev_get_drvdata(dev)	;
 	unsigned int reg;
@@ -1213,7 +1213,7 @@ static ssize_t sm501_dbg_regs(struct device *dev,
 }
 
 
-static DEVICE_ATTR(dbg_regs, 0444, sm501_dbg_regs, NULL);
+static DEVICE_ATTR_RO(dbg_regs);
 
 /* sm501_init_reg
  *
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 4/9] mfd: sm501: use DEVICE_ATTR_RO macro
@ 2021-06-02 11:43   ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/sm501.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 6d2f4a0a901dc08..bc0a2c38653e51c 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -1190,13 +1190,13 @@ static int sm501_register_gpio_i2c(struct sm501_devdata *sm,
 	return 0;
 }
 
-/* sm501_dbg_regs
+/* dbg_regs_show
  *
  * Debug attribute to attach to parent device to show core registers
 */
 
-static ssize_t sm501_dbg_regs(struct device *dev,
-			      struct device_attribute *attr, char *buff)
+static ssize_t dbg_regs_show(struct device *dev,
+			     struct device_attribute *attr, char *buff)
 {
 	struct sm501_devdata *sm = dev_get_drvdata(dev)	;
 	unsigned int reg;
@@ -1213,7 +1213,7 @@ static ssize_t sm501_dbg_regs(struct device *dev,
 }
 
 
-static DEVICE_ATTR(dbg_regs, 0444, sm501_dbg_regs, NULL);
+static DEVICE_ATTR_RO(dbg_regs);
 
 /* sm501_init_reg
  *
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 5/9] mfd: pcf50633: use DEVICE_ATTR_ADMIN_RO macro
  2021-06-02 11:43 ` Zhen Lei
@ 2021-06-02 11:43   ` Zhen Lei
  -1 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

Use DEVICE_ATTR_ADMIN_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>
---
 drivers/mfd/pcf50633-core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index 148bcd6120f45a3..e9c565cf0f54f29 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -77,8 +77,8 @@ int pcf50633_reg_clear_bits(struct pcf50633 *pcf, u8 reg, u8 val)
 EXPORT_SYMBOL_GPL(pcf50633_reg_clear_bits);
 
 /* sysfs attributes */
-static ssize_t show_dump_regs(struct device *dev, struct device_attribute *attr,
-			    char *buf)
+static ssize_t dump_regs_show(struct device *dev,
+			      struct device_attribute *attr, char *buf)
 {
 	struct pcf50633 *pcf = dev_get_drvdata(dev);
 	u8 dump[16];
@@ -106,10 +106,10 @@ static ssize_t show_dump_regs(struct device *dev, struct device_attribute *attr,
 
 	return buf1 - buf;
 }
-static DEVICE_ATTR(dump_regs, 0400, show_dump_regs, NULL);
+static DEVICE_ATTR_ADMIN_RO(dump_regs);
 
-static ssize_t show_resume_reason(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t resume_reason_show(struct device *dev,
+				  struct device_attribute *attr, char *buf)
 {
 	struct pcf50633 *pcf = dev_get_drvdata(dev);
 	int n;
@@ -123,7 +123,7 @@ static ssize_t show_resume_reason(struct device *dev,
 
 	return n;
 }
-static DEVICE_ATTR(resume_reason, 0400, show_resume_reason, NULL);
+static DEVICE_ATTR_ADMIN_RO(resume_reason);
 
 static struct attribute *pcf_sysfs_entries[] = {
 	&dev_attr_dump_regs.attr,
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 5/9] mfd: pcf50633: use DEVICE_ATTR_ADMIN_RO macro
@ 2021-06-02 11:43   ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

Use DEVICE_ATTR_ADMIN_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>
---
 drivers/mfd/pcf50633-core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index 148bcd6120f45a3..e9c565cf0f54f29 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -77,8 +77,8 @@ int pcf50633_reg_clear_bits(struct pcf50633 *pcf, u8 reg, u8 val)
 EXPORT_SYMBOL_GPL(pcf50633_reg_clear_bits);
 
 /* sysfs attributes */
-static ssize_t show_dump_regs(struct device *dev, struct device_attribute *attr,
-			    char *buf)
+static ssize_t dump_regs_show(struct device *dev,
+			      struct device_attribute *attr, char *buf)
 {
 	struct pcf50633 *pcf = dev_get_drvdata(dev);
 	u8 dump[16];
@@ -106,10 +106,10 @@ static ssize_t show_dump_regs(struct device *dev, struct device_attribute *attr,
 
 	return buf1 - buf;
 }
-static DEVICE_ATTR(dump_regs, 0400, show_dump_regs, NULL);
+static DEVICE_ATTR_ADMIN_RO(dump_regs);
 
-static ssize_t show_resume_reason(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t resume_reason_show(struct device *dev,
+				  struct device_attribute *attr, char *buf)
 {
 	struct pcf50633 *pcf = dev_get_drvdata(dev);
 	int n;
@@ -123,7 +123,7 @@ static ssize_t show_resume_reason(struct device *dev,
 
 	return n;
 }
-static DEVICE_ATTR(resume_reason, 0400, show_resume_reason, NULL);
+static DEVICE_ATTR_ADMIN_RO(resume_reason);
 
 static struct attribute *pcf_sysfs_entries[] = {
 	&dev_attr_dump_regs.attr,
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 6/9] mfd: kempld-core: use DEVICE_ATTR_RO macro
  2021-06-02 11:43 ` Zhen Lei
@ 2021-06-02 11:43   ` Zhen Lei
  -1 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/kempld-core.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
index 9166075c1f321a4..bb26241c73bdb8f 100644
--- a/drivers/mfd/kempld-core.c
+++ b/drivers/mfd/kempld-core.c
@@ -344,16 +344,16 @@ static const char *kempld_get_type_string(struct kempld_device_data *pld)
 	return version_type;
 }
 
-static ssize_t kempld_version_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t pld_version_show(struct device *dev,
+				struct device_attribute *attr, char *buf)
 {
 	struct kempld_device_data *pld = dev_get_drvdata(dev);
 
 	return scnprintf(buf, PAGE_SIZE, "%s\n", pld->info.version);
 }
 
-static ssize_t kempld_specification_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t pld_specification_show(struct device *dev,
+				      struct device_attribute *attr, char *buf)
 {
 	struct kempld_device_data *pld = dev_get_drvdata(dev);
 
@@ -361,18 +361,17 @@ static ssize_t kempld_specification_show(struct device *dev,
 		       pld->info.spec_minor);
 }
 
-static ssize_t kempld_type_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t pld_type_show(struct device *dev,
+			     struct device_attribute *attr, char *buf)
 {
 	struct kempld_device_data *pld = dev_get_drvdata(dev);
 
 	return scnprintf(buf, PAGE_SIZE, "%s\n", kempld_get_type_string(pld));
 }
 
-static DEVICE_ATTR(pld_version, S_IRUGO, kempld_version_show, NULL);
-static DEVICE_ATTR(pld_specification, S_IRUGO, kempld_specification_show,
-		   NULL);
-static DEVICE_ATTR(pld_type, S_IRUGO, kempld_type_show, NULL);
+static DEVICE_ATTR_RO(pld_version);
+static DEVICE_ATTR_RO(pld_specification);
+static DEVICE_ATTR_RO(pld_type);
 
 static struct attribute *pld_attributes[] = {
 	&dev_attr_pld_version.attr,
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 6/9] mfd: kempld-core: use DEVICE_ATTR_RO macro
@ 2021-06-02 11:43   ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/kempld-core.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
index 9166075c1f321a4..bb26241c73bdb8f 100644
--- a/drivers/mfd/kempld-core.c
+++ b/drivers/mfd/kempld-core.c
@@ -344,16 +344,16 @@ static const char *kempld_get_type_string(struct kempld_device_data *pld)
 	return version_type;
 }
 
-static ssize_t kempld_version_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t pld_version_show(struct device *dev,
+				struct device_attribute *attr, char *buf)
 {
 	struct kempld_device_data *pld = dev_get_drvdata(dev);
 
 	return scnprintf(buf, PAGE_SIZE, "%s\n", pld->info.version);
 }
 
-static ssize_t kempld_specification_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t pld_specification_show(struct device *dev,
+				      struct device_attribute *attr, char *buf)
 {
 	struct kempld_device_data *pld = dev_get_drvdata(dev);
 
@@ -361,18 +361,17 @@ static ssize_t kempld_specification_show(struct device *dev,
 		       pld->info.spec_minor);
 }
 
-static ssize_t kempld_type_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t pld_type_show(struct device *dev,
+			     struct device_attribute *attr, char *buf)
 {
 	struct kempld_device_data *pld = dev_get_drvdata(dev);
 
 	return scnprintf(buf, PAGE_SIZE, "%s\n", kempld_get_type_string(pld));
 }
 
-static DEVICE_ATTR(pld_version, S_IRUGO, kempld_version_show, NULL);
-static DEVICE_ATTR(pld_specification, S_IRUGO, kempld_specification_show,
-		   NULL);
-static DEVICE_ATTR(pld_type, S_IRUGO, kempld_type_show, NULL);
+static DEVICE_ATTR_RO(pld_version);
+static DEVICE_ATTR_RO(pld_specification);
+static DEVICE_ATTR_RO(pld_type);
 
 static struct attribute *pld_attributes[] = {
 	&dev_attr_pld_version.attr,
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 7/9] mfd: janz-cmodio: use DEVICE_ATTR_RO macro
  2021-06-02 11:43 ` Zhen Lei
@ 2021-06-02 11:43   ` Zhen Lei
  -1 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/janz-cmodio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/janz-cmodio.c b/drivers/mfd/janz-cmodio.c
index 3df4e9a2998f490..70eba4ce496faa3 100644
--- a/drivers/mfd/janz-cmodio.c
+++ b/drivers/mfd/janz-cmodio.c
@@ -149,15 +149,15 @@ static int cmodio_probe_submodules(struct cmodio_device *priv)
  * SYSFS Attributes
  */
 
-static ssize_t mbus_show(struct device *dev, struct device_attribute *attr,
-			 char *buf)
+static ssize_t modulbus_number_show(struct device *dev,
+				    struct device_attribute *attr, char *buf)
 {
 	struct cmodio_device *priv = dev_get_drvdata(dev);
 
 	return snprintf(buf, PAGE_SIZE, "%x\n", priv->hex);
 }
 
-static DEVICE_ATTR(modulbus_number, S_IRUGO, mbus_show, NULL);
+static DEVICE_ATTR_RO(modulbus_number);
 
 static struct attribute *cmodio_sysfs_attrs[] = {
 	&dev_attr_modulbus_number.attr,
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 7/9] mfd: janz-cmodio: use DEVICE_ATTR_RO macro
@ 2021-06-02 11:43   ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

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>
---
 drivers/mfd/janz-cmodio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/janz-cmodio.c b/drivers/mfd/janz-cmodio.c
index 3df4e9a2998f490..70eba4ce496faa3 100644
--- a/drivers/mfd/janz-cmodio.c
+++ b/drivers/mfd/janz-cmodio.c
@@ -149,15 +149,15 @@ static int cmodio_probe_submodules(struct cmodio_device *priv)
  * SYSFS Attributes
  */
 
-static ssize_t mbus_show(struct device *dev, struct device_attribute *attr,
-			 char *buf)
+static ssize_t modulbus_number_show(struct device *dev,
+				    struct device_attribute *attr, char *buf)
 {
 	struct cmodio_device *priv = dev_get_drvdata(dev);
 
 	return snprintf(buf, PAGE_SIZE, "%x\n", priv->hex);
 }
 
-static DEVICE_ATTR(modulbus_number, S_IRUGO, mbus_show, NULL);
+static DEVICE_ATTR_RO(modulbus_number);
 
 static struct attribute *cmodio_sysfs_attrs[] = {
 	&dev_attr_modulbus_number.attr,
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 8/9] mfd: intel_soc_pmic_bxtwc: use DEVICE_ATTR_ADMIN_RW macro
  2021-06-02 11:43 ` Zhen Lei
@ 2021-06-02 11:43   ` Zhen Lei
  -1 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

Use DEVICE_ATTR_ADMIN_RW 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>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 47d0d3a69a58a37..bc069c4daa60393 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -330,14 +330,14 @@ static int regmap_ipc_byte_reg_write(void *context, unsigned int reg,
 
 /* sysfs interfaces to r/w PMIC registers, required by initial script */
 static unsigned long bxtwc_reg_addr;
-static ssize_t bxtwc_reg_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t addr_show(struct device *dev,
+			 struct device_attribute *attr, char *buf)
 {
 	return sprintf(buf, "0x%lx\n", bxtwc_reg_addr);
 }
 
-static ssize_t bxtwc_reg_store(struct device *dev,
-	struct device_attribute *attr, const char *buf, size_t count)
+static ssize_t addr_store(struct device *dev,
+			  struct device_attribute *attr, const char *buf, size_t count)
 {
 	if (kstrtoul(buf, 0, &bxtwc_reg_addr)) {
 		dev_err(dev, "Invalid register address\n");
@@ -346,8 +346,8 @@ static ssize_t bxtwc_reg_store(struct device *dev,
 	return (ssize_t)count;
 }
 
-static ssize_t bxtwc_val_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t val_show(struct device *dev,
+			struct device_attribute *attr, char *buf)
 {
 	int ret;
 	unsigned int val;
@@ -362,8 +362,8 @@ static ssize_t bxtwc_val_show(struct device *dev,
 	return sprintf(buf, "0x%02x\n", val);
 }
 
-static ssize_t bxtwc_val_store(struct device *dev,
-	struct device_attribute *attr, const char *buf, size_t count)
+static ssize_t val_store(struct device *dev,
+			 struct device_attribute *attr, const char *buf, size_t count)
 {
 	int ret;
 	unsigned int val;
@@ -382,8 +382,8 @@ static ssize_t bxtwc_val_store(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(addr, S_IWUSR | S_IRUSR, bxtwc_reg_show, bxtwc_reg_store);
-static DEVICE_ATTR(val, S_IWUSR | S_IRUSR, bxtwc_val_show, bxtwc_val_store);
+static DEVICE_ATTR_ADMIN_RW(addr);
+static DEVICE_ATTR_ADMIN_RW(val);
 static struct attribute *bxtwc_attrs[] = {
 	&dev_attr_addr.attr,
 	&dev_attr_val.attr,
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 8/9] mfd: intel_soc_pmic_bxtwc: use DEVICE_ATTR_ADMIN_RW macro
@ 2021-06-02 11:43   ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

Use DEVICE_ATTR_ADMIN_RW 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>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 47d0d3a69a58a37..bc069c4daa60393 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -330,14 +330,14 @@ static int regmap_ipc_byte_reg_write(void *context, unsigned int reg,
 
 /* sysfs interfaces to r/w PMIC registers, required by initial script */
 static unsigned long bxtwc_reg_addr;
-static ssize_t bxtwc_reg_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t addr_show(struct device *dev,
+			 struct device_attribute *attr, char *buf)
 {
 	return sprintf(buf, "0x%lx\n", bxtwc_reg_addr);
 }
 
-static ssize_t bxtwc_reg_store(struct device *dev,
-	struct device_attribute *attr, const char *buf, size_t count)
+static ssize_t addr_store(struct device *dev,
+			  struct device_attribute *attr, const char *buf, size_t count)
 {
 	if (kstrtoul(buf, 0, &bxtwc_reg_addr)) {
 		dev_err(dev, "Invalid register address\n");
@@ -346,8 +346,8 @@ static ssize_t bxtwc_reg_store(struct device *dev,
 	return (ssize_t)count;
 }
 
-static ssize_t bxtwc_val_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t val_show(struct device *dev,
+			struct device_attribute *attr, char *buf)
 {
 	int ret;
 	unsigned int val;
@@ -362,8 +362,8 @@ static ssize_t bxtwc_val_show(struct device *dev,
 	return sprintf(buf, "0x%02x\n", val);
 }
 
-static ssize_t bxtwc_val_store(struct device *dev,
-	struct device_attribute *attr, const char *buf, size_t count)
+static ssize_t val_store(struct device *dev,
+			 struct device_attribute *attr, const char *buf, size_t count)
 {
 	int ret;
 	unsigned int val;
@@ -382,8 +382,8 @@ static ssize_t bxtwc_val_store(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(addr, S_IWUSR | S_IRUSR, bxtwc_reg_show, bxtwc_reg_store);
-static DEVICE_ATTR(val, S_IWUSR | S_IRUSR, bxtwc_val_show, bxtwc_val_store);
+static DEVICE_ATTR_ADMIN_RW(addr);
+static DEVICE_ATTR_ADMIN_RW(val);
 static struct attribute *bxtwc_attrs[] = {
 	&dev_attr_addr.attr,
 	&dev_attr_val.attr,
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 9/9] mfd: ab8500-core: use DEVICE_ATTR_RO/RW macro
  2021-06-02 11:43 ` Zhen Lei
@ 2021-06-02 11:43   ` Zhen Lei
  -1 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

Use DEVICE_ATTR_RO/RW 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>
---
 drivers/mfd/ab8500-core.c | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index c2ba498ad302dcd..30489670ea528ce 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -827,8 +827,8 @@ static const struct mfd_cell ab8540_cut2_devs[] = {
 	},
 };
 
-static ssize_t show_chip_id(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t chip_id_show(struct device *dev,
+			    struct device_attribute *attr, char *buf)
 {
 	struct ab8500 *ab8500;
 
@@ -848,8 +848,8 @@ static ssize_t show_chip_id(struct device *dev,
  * 0x40 Power on key 1 pressed longer than 10 seconds
  * 0x80 DB8500 thermal shutdown
  */
-static ssize_t show_switch_off_status(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t switch_off_status_show(struct device *dev,
+				      struct device_attribute *attr, char *buf)
 {
 	int ret;
 	u8 value;
@@ -883,8 +883,8 @@ void ab8500_override_turn_on_stat(u8 mask, u8 set)
  * 0x40 UsbIDDetect
  * 0x80 Reserved
  */
-static ssize_t show_turn_on_status(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t turn_on_status_show(struct device *dev,
+				   struct device_attribute *attr, char *buf)
 {
 	int ret;
 	u8 value;
@@ -912,8 +912,8 @@ static ssize_t show_turn_on_status(struct device *dev,
 	return sprintf(buf, "%#x\n", value);
 }
 
-static ssize_t show_turn_on_status_2(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t turn_on_status_2_show(struct device *dev,
+				     struct device_attribute *attr, char *buf)
 {
 	int ret;
 	u8 value;
@@ -927,8 +927,8 @@ static ssize_t show_turn_on_status_2(struct device *dev,
 	return sprintf(buf, "%#x\n", (value & 0x1));
 }
 
-static ssize_t show_ab9540_dbbrstn(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t dbbrstn_show(struct device *dev,
+			    struct device_attribute *attr, char *buf)
 {
 	struct ab8500 *ab8500;
 	int ret;
@@ -945,7 +945,7 @@ static ssize_t show_ab9540_dbbrstn(struct device *dev,
 			(value & AB9540_MODEM_CTRL2_SWDBBRSTN_BIT) ? 1 : 0);
 }
 
-static ssize_t store_ab9540_dbbrstn(struct device *dev,
+static ssize_t dbbrstn_store(struct device *dev,
 	struct device_attribute *attr, const char *buf, size_t count)
 {
 	struct ab8500 *ab8500;
@@ -980,12 +980,11 @@ static ssize_t store_ab9540_dbbrstn(struct device *dev,
 	return ret;
 }
 
-static DEVICE_ATTR(chip_id, S_IRUGO, show_chip_id, NULL);
-static DEVICE_ATTR(switch_off_status, S_IRUGO, show_switch_off_status, NULL);
-static DEVICE_ATTR(turn_on_status, S_IRUGO, show_turn_on_status, NULL);
-static DEVICE_ATTR(turn_on_status_2, S_IRUGO, show_turn_on_status_2, NULL);
-static DEVICE_ATTR(dbbrstn, S_IRUGO | S_IWUSR,
-			show_ab9540_dbbrstn, store_ab9540_dbbrstn);
+static DEVICE_ATTR_RO(chip_id);
+static DEVICE_ATTR_RO(switch_off_status);
+static DEVICE_ATTR_RO(turn_on_status);
+static DEVICE_ATTR_RO(turn_on_status_2);
+static DEVICE_ATTR_RW(dbbrstn);
 
 static struct attribute *ab8500_sysfs_entries[] = {
 	&dev_attr_chip_id.attr,
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 9/9] mfd: ab8500-core: use DEVICE_ATTR_RO/RW macro
@ 2021-06-02 11:43   ` Zhen Lei
  0 siblings, 0 replies; 40+ messages in thread
From: Zhen Lei @ 2021-06-02 11:43 UTC (permalink / raw)
  To: Lee Jones, patches, linux-arm-kernel, linux-kernel; +Cc: Zhen Lei

Use DEVICE_ATTR_RO/RW 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>
---
 drivers/mfd/ab8500-core.c | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index c2ba498ad302dcd..30489670ea528ce 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -827,8 +827,8 @@ static const struct mfd_cell ab8540_cut2_devs[] = {
 	},
 };
 
-static ssize_t show_chip_id(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t chip_id_show(struct device *dev,
+			    struct device_attribute *attr, char *buf)
 {
 	struct ab8500 *ab8500;
 
@@ -848,8 +848,8 @@ static ssize_t show_chip_id(struct device *dev,
  * 0x40 Power on key 1 pressed longer than 10 seconds
  * 0x80 DB8500 thermal shutdown
  */
-static ssize_t show_switch_off_status(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t switch_off_status_show(struct device *dev,
+				      struct device_attribute *attr, char *buf)
 {
 	int ret;
 	u8 value;
@@ -883,8 +883,8 @@ void ab8500_override_turn_on_stat(u8 mask, u8 set)
  * 0x40 UsbIDDetect
  * 0x80 Reserved
  */
-static ssize_t show_turn_on_status(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t turn_on_status_show(struct device *dev,
+				   struct device_attribute *attr, char *buf)
 {
 	int ret;
 	u8 value;
@@ -912,8 +912,8 @@ static ssize_t show_turn_on_status(struct device *dev,
 	return sprintf(buf, "%#x\n", value);
 }
 
-static ssize_t show_turn_on_status_2(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t turn_on_status_2_show(struct device *dev,
+				     struct device_attribute *attr, char *buf)
 {
 	int ret;
 	u8 value;
@@ -927,8 +927,8 @@ static ssize_t show_turn_on_status_2(struct device *dev,
 	return sprintf(buf, "%#x\n", (value & 0x1));
 }
 
-static ssize_t show_ab9540_dbbrstn(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t dbbrstn_show(struct device *dev,
+			    struct device_attribute *attr, char *buf)
 {
 	struct ab8500 *ab8500;
 	int ret;
@@ -945,7 +945,7 @@ static ssize_t show_ab9540_dbbrstn(struct device *dev,
 			(value & AB9540_MODEM_CTRL2_SWDBBRSTN_BIT) ? 1 : 0);
 }
 
-static ssize_t store_ab9540_dbbrstn(struct device *dev,
+static ssize_t dbbrstn_store(struct device *dev,
 	struct device_attribute *attr, const char *buf, size_t count)
 {
 	struct ab8500 *ab8500;
@@ -980,12 +980,11 @@ static ssize_t store_ab9540_dbbrstn(struct device *dev,
 	return ret;
 }
 
-static DEVICE_ATTR(chip_id, S_IRUGO, show_chip_id, NULL);
-static DEVICE_ATTR(switch_off_status, S_IRUGO, show_switch_off_status, NULL);
-static DEVICE_ATTR(turn_on_status, S_IRUGO, show_turn_on_status, NULL);
-static DEVICE_ATTR(turn_on_status_2, S_IRUGO, show_turn_on_status_2, NULL);
-static DEVICE_ATTR(dbbrstn, S_IRUGO | S_IWUSR,
-			show_ab9540_dbbrstn, store_ab9540_dbbrstn);
+static DEVICE_ATTR_RO(chip_id);
+static DEVICE_ATTR_RO(switch_off_status);
+static DEVICE_ATTR_RO(turn_on_status);
+static DEVICE_ATTR_RO(turn_on_status_2);
+static DEVICE_ATTR_RW(dbbrstn);
 
 static struct attribute *ab8500_sysfs_entries[] = {
 	&dev_attr_chip_id.attr,
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* Re: [PATCH 1/9] mfd: wm831x: use DEVICE_ATTR_RO macro
  2021-06-02 11:43   ` Zhen Lei
@ 2021-06-02 12:39     ` Charles Keepax
  -1 siblings, 0 replies; 40+ messages in thread
From: Charles Keepax @ 2021-06-02 12:39 UTC (permalink / raw)
  To: Zhen Lei; +Cc: Lee Jones, patches, linux-arm-kernel, linux-kernel

On Wed, Jun 02, 2021 at 07:43:31PM +0800, Zhen Lei wrote:
> 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>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 1/9] mfd: wm831x: use DEVICE_ATTR_RO macro
@ 2021-06-02 12:39     ` Charles Keepax
  0 siblings, 0 replies; 40+ messages in thread
From: Charles Keepax @ 2021-06-02 12:39 UTC (permalink / raw)
  To: Zhen Lei; +Cc: Lee Jones, patches, linux-arm-kernel, linux-kernel

On Wed, Jun 02, 2021 at 07:43:31PM +0800, Zhen Lei wrote:
> 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>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 1/9] mfd: wm831x: use DEVICE_ATTR_RO macro
  2021-06-02 11:43   ` Zhen Lei
@ 2021-06-15 11:50     ` Lee Jones
  -1 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 11:50 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/wm831x-otp.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 1/9] mfd: wm831x: use DEVICE_ATTR_RO macro
@ 2021-06-15 11:50     ` Lee Jones
  0 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 11:50 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/wm831x-otp.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 2/9] mfd: ucb1x00-assabet: use DEVICE_ATTR_RO macro
  2021-06-02 11:43   ` Zhen Lei
@ 2021-06-15 11:51     ` Lee Jones
  -1 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 11:51 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/ucb1x00-assabet.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 2/9] mfd: ucb1x00-assabet: use DEVICE_ATTR_RO macro
@ 2021-06-15 11:51     ` Lee Jones
  0 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 11:51 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/ucb1x00-assabet.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 3/9] mfd: timberdale: use DEVICE_ATTR_RO macro
  2021-06-02 11:43   ` Zhen Lei
@ 2021-06-15 11:51     ` Lee Jones
  -1 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 11:51 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/timberdale.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 3/9] mfd: timberdale: use DEVICE_ATTR_RO macro
@ 2021-06-15 11:51     ` Lee Jones
  0 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 11:51 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/timberdale.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 4/9] mfd: sm501: use DEVICE_ATTR_RO macro
  2021-06-02 11:43   ` Zhen Lei
@ 2021-06-15 12:03     ` Lee Jones
  -1 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:03 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/sm501.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 4/9] mfd: sm501: use DEVICE_ATTR_RO macro
@ 2021-06-15 12:03     ` Lee Jones
  0 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:03 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/sm501.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 5/9] mfd: pcf50633: use DEVICE_ATTR_ADMIN_RO macro
  2021-06-02 11:43   ` Zhen Lei
@ 2021-06-15 12:03     ` Lee Jones
  -1 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:03 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> Use DEVICE_ATTR_ADMIN_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>
> ---
>  drivers/mfd/pcf50633-core.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 5/9] mfd: pcf50633: use DEVICE_ATTR_ADMIN_RO macro
@ 2021-06-15 12:03     ` Lee Jones
  0 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:03 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> Use DEVICE_ATTR_ADMIN_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>
> ---
>  drivers/mfd/pcf50633-core.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 6/9] mfd: kempld-core: use DEVICE_ATTR_RO macro
  2021-06-02 11:43   ` Zhen Lei
@ 2021-06-15 12:14     ` Lee Jones
  -1 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:14 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/kempld-core.c | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 6/9] mfd: kempld-core: use DEVICE_ATTR_RO macro
@ 2021-06-15 12:14     ` Lee Jones
  0 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:14 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/kempld-core.c | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 7/9] mfd: janz-cmodio: use DEVICE_ATTR_RO macro
  2021-06-02 11:43   ` Zhen Lei
@ 2021-06-15 12:14     ` Lee Jones
  -1 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:14 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/janz-cmodio.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 7/9] mfd: janz-cmodio: use DEVICE_ATTR_RO macro
@ 2021-06-15 12:14     ` Lee Jones
  0 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:14 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> 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>
> ---
>  drivers/mfd/janz-cmodio.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 8/9] mfd: intel_soc_pmic_bxtwc: use DEVICE_ATTR_ADMIN_RW macro
  2021-06-02 11:43   ` Zhen Lei
@ 2021-06-15 12:14     ` Lee Jones
  -1 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:14 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> Use DEVICE_ATTR_ADMIN_RW 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>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 8/9] mfd: intel_soc_pmic_bxtwc: use DEVICE_ATTR_ADMIN_RW macro
@ 2021-06-15 12:14     ` Lee Jones
  0 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:14 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> Use DEVICE_ATTR_ADMIN_RW 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>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 9/9] mfd: ab8500-core: use DEVICE_ATTR_RO/RW macro
  2021-06-02 11:43   ` Zhen Lei
@ 2021-06-15 12:15     ` Lee Jones
  -1 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:15 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> Use DEVICE_ATTR_RO/RW 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>
> ---
>  drivers/mfd/ab8500-core.c | 33 ++++++++++++++++-----------------
>  1 file changed, 16 insertions(+), 17 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 9/9] mfd: ab8500-core: use DEVICE_ATTR_RO/RW macro
@ 2021-06-15 12:15     ` Lee Jones
  0 siblings, 0 replies; 40+ messages in thread
From: Lee Jones @ 2021-06-15 12:15 UTC (permalink / raw)
  To: Zhen Lei; +Cc: patches, linux-arm-kernel, linux-kernel

On Wed, 02 Jun 2021, Zhen Lei wrote:

> Use DEVICE_ATTR_RO/RW 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>
> ---
>  drivers/mfd/ab8500-core.c | 33 ++++++++++++++++-----------------
>  1 file changed, 16 insertions(+), 17 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2021-06-15 18:46 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 11:43 [PATCH 0/9] mfd: use DEVICE_ATTR_* macro to simplify code Zhen Lei
2021-06-02 11:43 ` Zhen Lei
2021-06-02 11:43 ` [PATCH 1/9] mfd: wm831x: use DEVICE_ATTR_RO macro Zhen Lei
2021-06-02 11:43   ` Zhen Lei
2021-06-02 12:39   ` Charles Keepax
2021-06-02 12:39     ` Charles Keepax
2021-06-15 11:50   ` Lee Jones
2021-06-15 11:50     ` Lee Jones
2021-06-02 11:43 ` [PATCH 2/9] mfd: ucb1x00-assabet: " Zhen Lei
2021-06-02 11:43   ` Zhen Lei
2021-06-15 11:51   ` Lee Jones
2021-06-15 11:51     ` Lee Jones
2021-06-02 11:43 ` [PATCH 3/9] mfd: timberdale: " Zhen Lei
2021-06-02 11:43   ` Zhen Lei
2021-06-15 11:51   ` Lee Jones
2021-06-15 11:51     ` Lee Jones
2021-06-02 11:43 ` [PATCH 4/9] mfd: sm501: " Zhen Lei
2021-06-02 11:43   ` Zhen Lei
2021-06-15 12:03   ` Lee Jones
2021-06-15 12:03     ` Lee Jones
2021-06-02 11:43 ` [PATCH 5/9] mfd: pcf50633: use DEVICE_ATTR_ADMIN_RO macro Zhen Lei
2021-06-02 11:43   ` Zhen Lei
2021-06-15 12:03   ` Lee Jones
2021-06-15 12:03     ` Lee Jones
2021-06-02 11:43 ` [PATCH 6/9] mfd: kempld-core: use DEVICE_ATTR_RO macro Zhen Lei
2021-06-02 11:43   ` Zhen Lei
2021-06-15 12:14   ` Lee Jones
2021-06-15 12:14     ` Lee Jones
2021-06-02 11:43 ` [PATCH 7/9] mfd: janz-cmodio: " Zhen Lei
2021-06-02 11:43   ` Zhen Lei
2021-06-15 12:14   ` Lee Jones
2021-06-15 12:14     ` Lee Jones
2021-06-02 11:43 ` [PATCH 8/9] mfd: intel_soc_pmic_bxtwc: use DEVICE_ATTR_ADMIN_RW macro Zhen Lei
2021-06-02 11:43   ` Zhen Lei
2021-06-15 12:14   ` Lee Jones
2021-06-15 12:14     ` Lee Jones
2021-06-02 11:43 ` [PATCH 9/9] mfd: ab8500-core: use DEVICE_ATTR_RO/RW macro Zhen Lei
2021-06-02 11:43   ` Zhen Lei
2021-06-15 12:15   ` Lee Jones
2021-06-15 12:15     ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.