[PATCH 1/2] Input: gpio-keys: do not reference platform_data after .probe exits
From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
Date: 2011-07-18 17:24:21
Also in:
linux-devicetree, linux-input
From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
Date: 2011-07-18 17:24:21
Also in:
linux-devicetree, linux-input
On Monday, July 18, 2011 10:15:27 AM Grant Likely wrote:
On Mon, Jul 18, 2011 at 11:02 AM, Dmitry Torokhov [off-list ref] wrote:quoted
On Monday, July 18, 2011 09:45:07 AM Shawn Guo wrote:quoted
The patch makes a copy of platform data into driver data, so that any reference to platform_data after .probe exits can be avoided.And why is this beneficial? I am of the opinion that platform data should stay on (and be accessed through a const pointer to ensure that the driver will not alter it).Because when using the device tree, there is no platform_data.
So allocate it... That's what Davids patch does. BTW, you never gave ACK for the final version and I'd prefer to have it for the DT bindings. Thanks. -- Dmitry