From: Nicolin Chen <b42378@freescale.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, devicetree-discuss@lists.ozlabs.org,
patches@opensource.wolfsonmicro.com, lgirdwood@gmail.com,
rob.herring@calxeda.com, grant.likely@linaro.org
Subject: Re: [PATCH 1/2] ASoC: WM8962: Create default platform data structure
Date: Thu, 6 Jun 2013 11:21:26 +0800 [thread overview]
Message-ID: <20130606032125.GA18783@MrMyself> (raw)
In-Reply-To: <20130605122511.GB31367@sirena.org.uk>
On Wed, Jun 05, 2013 at 01:25:11PM +0100, Mark Brown wrote:
> On Wed, Jun 05, 2013 at 08:12:55PM +0800, Nicolin Chen wrote:
>
> > struct wm8962_priv {
> > + struct wm8962_pdata *pdata;
>
> More idiomatic style for this is to just embed a copy of the platform
> data struct in the private data then copy any driver model platform data
> on top of it. This simplifies usage as now the driver can assume that
> there is platform data available at all times.
Hmm..sorry I don't fully get it. Does that mean I should do something like:
struct wm8962_priv {
struct wm8962_pdata pdata;
instead of pointer? so no devm_kzalloc() for it any more?
next prev parent reply other threads:[~2013-06-06 3:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 12:12 [PATCH 0/2] Add device tree binding support to WM8962 codec driver Nicolin Chen
2013-06-05 12:12 ` [PATCH 1/2] ASoC: WM8962: Create default platform data structure Nicolin Chen
2013-06-05 12:25 ` Mark Brown
2013-06-06 3:21 ` Nicolin Chen [this message]
2013-06-06 8:42 ` Mark Brown
2013-06-05 12:12 ` [PATCH 2/2] ASoC: WM8962: Add device tree binding Nicolin Chen
2013-06-05 12:27 ` Mark Brown
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=20130606032125.GA18783@MrMyself \
--to=b42378@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=patches@opensource.wolfsonmicro.com \
--cc=rob.herring@calxeda.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).