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.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to