[alsa-devel] [PATCH 2/5] ASoC: dpcm: Add debugFS support for DPCM

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Apr 26 18:44:54 CEST 2012


On Wed, Apr 25, 2012 at 12:12:50PM +0100, Liam Girdwood wrote:

I've queued this to apply this but a few nits I noticed:

> +#ifdef CONFIG_DEBUG_FS
> +	dpcm->debugfs_state = debugfs_create_u32(be->dai_link->name, 0644,
> +			fe->debugfs_dpcm_root, &dpcm->state);
> +#endif

I have to say that this being writable seems rather scary...  any great
need for that?

> +static int dpcm_state_open_file(struct inode *inode, struct file *file)
> +{
> +	file->private_data = inode->i_private;
> +	return 0;
> +}

This is simple_open() - could just remove this and use simple_open() in
the ops.

> +	if (fe->cpu_dai->driver->capture.channels_min)
> +		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);
> +
> +        return ret;

Suspect there's some spaces being used for indentation here...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120426/3b0c9705/attachment.sig 


More information about the Alsa-devel mailing list