diff mbox

[1/2] arm: omap2: mux: fix debugfs file permission

Message ID 1361269464-20263-1-git-send-email-balbi@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Felipe Balbi Feb. 19, 2013, 10:24 a.m. UTC
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.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/mux.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Tony Lindgren March 4, 2013, 7:18 p.m. UTC | #1
* Felipe Balbi <balbi@ti.com> [130219 02:28]:
> 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.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

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

Regards,

Tony

> ---
>  arch/arm/mach-omap2/mux.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
> index 6a217c9..03fa4f4 100644
> --- a/arch/arm/mach-omap2/mux.c
> +++ b/arch/arm/mach-omap2/mux.c
> @@ -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);
>  	}
>  }
>  
> -- 
> 1.8.1.rc1.5.g7e0651a
>
Felipe Balbi March 4, 2013, 8:19 p.m. UTC | #2
On Mon, Mar 04, 2013 at 11:18:31AM -0800, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [130219 02:28]:
> > 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.
> > 
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
> 
> Heh indeed, although read still seems to work without it.
> Applying into omap-for-v3.9/fixes.

root can always read, I guess.
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 6a217c9..03fa4f4 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -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);
 	}
 }