Skip to contentSkip to conversation

arm: omap2: mux: fix debugfs file permission

PATCH New Felipe Balbi 2 participants 4 messages Feb 19, 2013 – Mar 4, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm: omap2: mux: fix debugfs file permission

OMAP's debugfs interface creates one file for each signal in the mux table, such file provides a read method but didn't provide read permission. Fix it.

---
 arch/arm/mach-omap2/mux.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/mux.c +3 -2
index 6a217c9..03fa4f4 100644
@@ -739,8 +739,9 @@ static void __init omap_mux_dbg_create_entry(
 	list_for_each_entry(e, &partition->muxmodes, node) {
 		struct omap_mux *m = &e->mux;
 
-		(void)debugfs_create_file(m->muxnames[0], S_IWUSR, mux_dbg_dir,
-					  m, &omap_mux_dbg_signal_fops);
+		(void)debugfs_create_file(m->muxnames[0], S_IWUSR | S_IRUGO,
+					  mux_dbg_dir, m,
+					  &omap_mux_dbg_signal_fops);
 	}
 }
 
Signature · 1 line
1.8.1.rc1.5.g7e0651a
#1 lore raw

PATCH 2/2 arm: omap2: voltage: remove unnecessary header

nothing from <linux/debugfs.h> is used on
voltage.c.

---
 arch/arm/mach-omap2/voltage.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-omap2/voltage.c +0 -1
index 3ac8fe1..595bf1a 100644
@@ -23,7 +23,6 @@
 #include <linux/io.h>
 #include <linux/err.h>
 #include <linux/export.h>
-#include <linux/debugfs.h>
 #include <linux/slab.h>
 #include <linux/clk.h>
 
Signature · 1 line
1.8.1.rc1.5.g7e0651a
maintainer
#2 lore raw

PATCH 1/2 arm: omap2: mux: fix debugfs file permission

In reply to Felipe Balbi
Quoted 6 lines · Felipe Balbi

OMAP's debugfs interface creates one file for each signal in the mux table, such file provides a read method but didn't provide read permission. Fix it.

Heh indeed, although read still seems to work without it. Applying into omap-for-v3.9/fixes.

Regards,

Tony

Quoted 23 lines
---
 arch/arm/mach-omap2/mux.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/mux.c +3 -2
index 6a217c9..03fa4f4 100644
@@ -739,8 +739,9 @@ static void __init omap_mux_dbg_create_entry(
 	list_for_each_entry(e, &partition->muxmodes, node) {
 		struct omap_mux *m = &e->mux;
 
-		(void)debugfs_create_file(m->muxnames[0], S_IWUSR, mux_dbg_dir,
-					  m, &omap_mux_dbg_signal_fops);
+		(void)debugfs_create_file(m->muxnames[0], S_IWUSR | S_IRUGO,
+					  mux_dbg_dir, m,
+					  &omap_mux_dbg_signal_fops);
 	}
 }
 
Signature · 1 line
1.8.1.rc1.5.g7e0651a
#3 lore raw

PATCH 1/2 arm: omap2: mux: fix debugfs file permission

Quoted 10 lines · Tony Lindgren
Quoted 6 lines · Felipe Balbi

OMAP's debugfs interface creates one file for each signal in the mux table, such file provides a read method but didn't provide read permission. Fix it.

Heh indeed, although read still seems to work without it. Applying into omap-for-v3.9/fixes.

root can always read, I guess.

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130304/4b75fd5b/attachment-0001.sig>