alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Sangbeom Kim <sbkim73@samsung.com>
Cc: alsa-devel@alsa-project.org, lrg@ti.com, sangsu4u.park@samsung.com
Subject: Re: [PATCH] ASoC: Allocate PCM operations dynamically to support multiple DAIs
Date: Fri, 23 Dec 2011 10:24:14 +0000	[thread overview]
Message-ID: <20111223102413.GB2834@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <053701ccc113$7c39bd80$74ad3880$@com>

On Fri, Dec 23, 2011 at 10:37:51AM +0900, Sangbeom Kim wrote:

> +	soc_pcm_ops = kzalloc(sizeof(*soc_pcm_ops), GFP_KERNEL);
> +	if (soc_pcm_ops == NULL) {
> +		snd_printk(KERN_ERR "Cannot allocate PCM OPS\n");
> +		return -ENOMEM;
> +	}

This patch is good and fixes a real problem but can you please change it
slightly so that instead of dynamically allocating the soc_pcm_ops we
just embed it directly in the runtime structure.  Since every runtime
needs an ops structure we may as well just have it embedded directly and
not write the allocation, freeing and error handling code.

  parent reply	other threads:[~2011-12-23 10:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-23  1:37 [PATCH] ASoC: Allocate PCM operations dynamically to support multiple DAIs Sangbeom Kim
2011-12-23  9:42 ` Liam Girdwood
2011-12-23 10:21   ` Mark Brown
2011-12-23 10:24 ` Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-12-27  8:06 Sangsu Park
2011-12-27 10:40 ` Mark Brown
2011-12-27  7:49 Sangsu Park
2011-12-27 10:34 ` Mark Brown
2011-12-23  0:26 Sangbeom Kim
2011-12-23 11:36 ` Lars-Peter Clausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111223102413.GB2834@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.com \
    --cc=sangsu4u.park@samsung.com \
    --cc=sbkim73@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).