From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH 1/2] Input: gpio-keys: do not reference platform_data after .probe exits Date: Mon, 18 Jul 2011 10:24:21 -0700 Message-ID: <201107181024.22134.dmitry.torokhov@gmail.com> References: <1311007508-8096-1-git-send-email-shawn.guo@linaro.org> <201107181002.45170.dmitry.torokhov@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-iw0-f174.google.com ([209.85.214.174]:37759 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754014Ab1GRRY1 (ORCPT ); Mon, 18 Jul 2011 13:24:27 -0400 Received: by iwn6 with SMTP id 6so3282178iwn.19 for ; Mon, 18 Jul 2011 10:24:27 -0700 (PDT) In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Grant Likely Cc: Shawn Guo , devicetree-discuss@lists.ozlabs.org, patches@linaro.org, Phil Blundell , linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org On Monday, July 18, 2011 10:15:27 AM Grant Likely wrote: > On Mon, Jul 18, 2011 at 11:02 AM, Dmitry Torokhov > > wrote: > > On Monday, July 18, 2011 09:45:07 AM Shawn Guo wrote: > >> 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