From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Daniel Mack <zonque@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 RESEND v2 1/2] Input: touchscreen: ads7846: keep copy of pdata in private struct
Date: Mon, 1 Jul 2013 00:21:48 -0700 [thread overview]
Message-ID: <20130701072148.GA9861@core.coreip.homeip.net> (raw)
In-Reply-To: <51D12C3C.1090002@gmail.com>
On Mon, Jul 01, 2013 at 09:14:04AM +0200, Daniel Mack wrote:
> On 01.07.2013 09:09, Dmitry Torokhov wrote:
> > Hi Daniel,
> >
> > On Mon, Jul 01, 2013 at 08:48:50AM +0200, Daniel Mack wrote:
> >> Hi Dmitry,
> >>
> >> On 01.07.2013 03:33, Dmitry Torokhov wrote:
> >>> On Sun, Jun 30, 2013 at 11:09:14PM +0200, Daniel Mack wrote:
> >>>> +
> >>>> + if (!pdata->model)
> >>>> + pdata->model = 7846;
> >>>> +
> >>>> + if (!pdata->vref_delay_usecs)
> >>>> + pdata->vref_delay_usecs = 100;
> >>>> +
> >>>> + if (!pdata->x_plate_ohms)
> >>>> + pdata->x_plate_ohms = 400;
> >>>> +
> >>>> + if (!pdata->pressure_max)
> >>>> + pdata->pressure_max = ~0;
> >>>
> >>> We should not be changing the platform data as the device does not own
> >>> it and it may well be declared as a constant structure.
> >>
> >> We don't change the platform data that is passed in via the driver core.
> >> We keep a copy of it in our private strucz (that's what the subject
> >> says) and in case of DT, we modify that copy. The passed pdata is left
> >> untouched.
> >>
> >
> > That might have been the intent but the patch only stores a _pointer_ to
> > the platform data in the main structure, so in non-DT case you end up
> > modifying the original structure.
>
> Eh, ok. I'll change that to always make a copy. Somehow though, I like
> the first approach (v1 of the set) better, which stored all data that is
> modified inside the private struct directly.
>
> Anyway, I'll submit v3 later.
No, there is no need, the other patch (adding DT bindings) should work
just fine without this one.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2013-07-01 7:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-30 21:09 [PATCH RESEND v2 1/2] Input: touchscreen: ads7846: keep copy of pdata in private struct Daniel Mack
2013-06-30 21:09 ` [PATCH RESEND v2 2/2] Input: touchscreen: ads7846: add device tree bindings Daniel Mack
2013-07-01 1:35 ` Dmitry Torokhov
2013-07-01 3:12 ` Dmitry Torokhov
2013-07-01 6:52 ` Daniel Mack
2013-07-01 1:33 ` [PATCH RESEND v2 1/2] Input: touchscreen: ads7846: keep copy of pdata in private struct Dmitry Torokhov
2013-07-01 6:48 ` Daniel Mack
2013-07-01 7:09 ` Dmitry Torokhov
2013-07-01 7:14 ` Daniel Mack
2013-07-01 7:21 ` Dmitry Torokhov [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-05-22 17:57 Daniel Mack
2013-06-23 13:01 ` Daniel Mack
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=20130701072148.GA9861@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=agust@denx.de \
--cc=broonie@kernel.org \
--cc=chf@fritzc.com \
--cc=grant.likely@linaro.org \
--cc=imre.deak@nokia.com \
--cc=linux-input@vger.kernel.org \
--cc=zonque@gmail.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 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.