All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <zonque@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, broonie@kernel.org,
	grant.likely@linaro.org, agust@denx.de, imre.deak@nokia.com,
	chf@fritzc.com
Subject: Re: [PATCH 1/2] Input: touchscreen: ads7846: copy info from pdata to private struct
Date: Mon, 06 May 2013 11:31:43 +0200	[thread overview]
Message-ID: <5187787F.70206@gmail.com> (raw)
In-Reply-To: <20130506032444.GD25084@core.coreip.homeip.net>

Hi Dmitry,

On 06.05.2013 05:24, Dmitry Torokhov wrote:
> On Thu, Apr 25, 2013 at 01:33:52PM +0200, Daniel Mack wrote:
>> In preparation for DT bindings, we have to store all runtime information
>> inside struct ads7846. Add more variable to struct ads7846 and refactor
>> some code so the probe-time supplied pdata is not used from any other
>> function than the probe() callback.
>>
> 
> I think more common pattern is to allocate platform data structure when
> parsing device tree, often with devm_kzalloc() so it is cleaned up after
> driver is unbound.

That was exactly my first approach as well, but I refrained from it due
to the function pointers in the struct, which I didn't want to carry
around for the DT case as they will always be unused. So I don't know -
I can switch back to that if you still want me to.


Thanks,
Daniel


  reply	other threads:[~2013-05-06  9:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25 11:33 [PATCH 1/2] Input: touchscreen: ads7846: copy info from pdata to private struct Daniel Mack
2013-04-25 11:33 ` [PATCH 2/2] Input: touchscreen: ads7846: add device tree bindings Daniel Mack
2013-05-06  3:24 ` [PATCH 1/2] Input: touchscreen: ads7846: copy info from pdata to private struct Dmitry Torokhov
2013-05-06  9:31   ` Daniel Mack [this message]
2013-05-06 10:25   ` Mark Brown
2013-05-06 10:34     ` Daniel Mack
2013-05-06 10:47       ` 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=5187787F.70206@gmail.com \
    --to=zonque@gmail.com \
    --cc=agust@denx.de \
    --cc=broonie@kernel.org \
    --cc=chf@fritzc.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=imre.deak@nokia.com \
    --cc=linux-input@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.