Skip to contentSkip to conversation

mfd: sm501: dbg_regs attribute must be read-only

PATCH Applied Guenter Roeck 2 participants 2 messages Sep 8, 2013 – Sep 9, 2013 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: sm501: dbg_regs attribute must be read-only

Fix:

sm501 sm501: SM501 At b3e00000: Version 050100a0, 8 Mb, IRQ 100 Attribute dbg_regs: write permission without 'store'

------------[ cut here ]------------
WARNING: at drivers/base/core.c:620

dbg_regs does not have a write function and must therefore be marked as read-only.

---
 drivers/mfd/sm501.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/sm501.c +1 -1
index 33f040c..3799a3d 100644
@@ -1232,7 +1232,7 @@ static ssize_t sm501_dbg_regs(struct device *dev,
 }
 
 
-static DEVICE_ATTR(dbg_regs, 0666, sm501_dbg_regs, NULL);
+static DEVICE_ATTR(dbg_regs, 0444, sm501_dbg_regs, NULL);
 
 /* sm501_init_reg
  *
Signature · 1 line
1.7.9.7
Applied
#1 lore raw
Quoted 7 lines · Guenter Roeck

Fix:

sm501 sm501: SM501 At b3e00000: Version 050100a0, 8 Mb, IRQ 100 Attribute dbg_regs: write permission without 'store'

------------[ cut here ]------------
WARNING: at drivers/base/core.c:620
Quoted 7 lines

dbg_regs does not have a write function and must therefore be marked as read-only.

---
 drivers/mfd/sm501.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog