* [PATCH] ASoC: dpcm: Fixup debugFS for DPCM state.
@ 2012-04-27 10:33 Liam Girdwood
2012-04-27 17:39 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Liam Girdwood @ 2012-04-27 10:33 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Liam Girdwood
Remove writable debugFS permission, use simple_open() and
fix indentation.
Signed-off-by: Liam Girdwood <lrg@ti.com>
---
sound/soc/soc-pcm.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ca19152..0e68d2d 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2389,12 +2389,6 @@ static char *dpcm_state_string(enum snd_soc_dpcm_state state)
return "unknown";
}
-static int dpcm_state_open_file(struct inode *inode, struct file *file)
-{
- file->private_data = inode->i_private;
- return 0;
-}
-
static ssize_t dpcm_show_state(struct snd_soc_pcm_runtime *fe,
int stream, char *buf, size_t size)
{
@@ -2472,15 +2466,14 @@ static ssize_t dpcm_state_read_file(struct file *file, char __user *user_buf,
offset += dpcm_show_state(fe, SNDRV_PCM_STREAM_CAPTURE,
buf + offset, out_count - offset);
- ret = simple_read_from_buffer(user_buf, count, ppos, buf, offset);
-
- kfree(buf);
+ ret = simple_read_from_buffer(user_buf, count, ppos, buf, offset);
- return ret;
+ kfree(buf);
+ return ret;
}
static const struct file_operations dpcm_state_fops = {
- .open = dpcm_state_open_file,
+ .open = simple_open,
.read = dpcm_state_read_file,
.llseek = default_llseek,
};
@@ -2496,7 +2489,7 @@ int soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd)
return -EINVAL;
}
- rtd->debugfs_dpcm_state = debugfs_create_file("state", 0644,
+ rtd->debugfs_dpcm_state = debugfs_create_file("state", 0444,
rtd->debugfs_dpcm_root,
rtd, &dpcm_state_fops);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: dpcm: Fixup debugFS for DPCM state.
2012-04-27 10:33 [PATCH] ASoC: dpcm: Fixup debugFS for DPCM state Liam Girdwood
@ 2012-04-27 17:39 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-04-27 17:39 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 160 bytes --]
On Fri, Apr 27, 2012 at 11:33:46AM +0100, Liam Girdwood wrote:
> Remove writable debugFS permission, use simple_open() and
> fix indentation.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-27 17:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27 10:33 [PATCH] ASoC: dpcm: Fixup debugFS for DPCM state Liam Girdwood
2012-04-27 17:39 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).