From patchwork Mon Jul 25 06:49:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_R=C3=83=C2=A9tornaz?= X-Patchwork-Id: 1003842 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6P6o0rZ005619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 25 Jul 2011 06:50:21 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QlEz1-0007Nc-Fy; Mon, 25 Jul 2011 06:49:43 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QlEz1-0001JP-41; Mon, 25 Jul 2011 06:49:43 +0000 Received: from smtp0.epfl.ch ([128.178.224.219]) by canuck.infradead.org with smtp (Exim 4.76 #1 (Red Hat Linux)) id 1QlEyx-0001J5-Jz for linux-arm-kernel@lists.infradead.org; Mon, 25 Jul 2011 06:49:40 +0000 Received: (qmail 14667 invoked by uid 107); 25 Jul 2011 06:49:28 -0000 X-Virus-Scanned: ClamAV Received: from lsro1pc38.epfl.ch (HELO discarded) (128.178.145.84) (authenticated) by smtp0.epfl.ch (AngelmatoPhylax SMTP proxy) with ESMTPA; Mon, 25 Jul 2011 08:49:28 +0200 From: Philippe =?iso-8859-1?q?R=E9tornaz?= Organization: EPFL - STI - LSRO1 To: Shawn Guo Subject: Re: [PATCH v6 0/6] mc13783: add pwr button support Date: Mon, 25 Jul 2011 08:49:25 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.38.8-35.fc15.x86_64; KDE/4.6.5; x86_64; ; ) References: <1311344232-29902-1-git-send-email-philippe.retornaz@epfl.ch> <20110724034418.GA28189@S2100-06.ap.freescale.net> In-Reply-To: <20110724034418.GA28189@S2100-06.ap.freescale.net> MIME-Version: 1.0 Message-Id: <201107250849.26071.philippe.retornaz@epfl.ch> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110725_024939_932936_E5E7D11E X-CRM114-Status: GOOD ( 18.36 ) X-Spam-Score: -3.5 (---) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-3.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [128.178.224.219 listed in list.dnswl.org] Cc: amit.kucheria@canonical.com, broonie@opensource.wolfsonmicro.com, sameo@linux.intel.com, s.hauer@pengutronix.de, dmitry.torokhov@gmail.com, gaowanlong@cn.fujitsu.com, linux-input@vger.kernel.org, u.kleine-koenig@pengutronix.de, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 25 Jul 2011 06:50:22 +0000 (UTC) X-MIME-Autoconverted: from quoted-printable to 8bit by demeter2.kernel.org id p6P6o0rZ005619 Le dimanche 24 juillet 2011 05:44:19, Shawn Guo a écrit : > On Fri, Jul 22, 2011 at 04:17:06PM +0200, Philippe Rétornaz wrote: > > Hello > > > > This add button handling for the MC13783 PMIC. > > > > Patch 1 & 2 modify the mc13xxx MFD driver to use the platform data to > > resgister the led subdevice and unconditionally register the regulator > > subdevice (as suggested by Mark and Uwe). > > > > Patch 3 remove the use of the *_USE_REGULATOR and *_USE_LED macros in > > the platform files. > > > > Patch 4 must be applied after patch 1,2,3 to remove the obsolete define. > > > > Patch 5 modify the mc13xxx MFD driver to add a button subdevice and > > also adds the mc13783-pwrbutton driver using a misc input device. > > > > The last patch adds the power on button support to the mx31moboard > > boards. > > > > v2: first patch modified according to comments by Dmitry Torokhov > > v3: Implement review by Uwe > > v4: Implement comments by Uwe and Mark > > v5: Reorder patchset > > v6: Minor corrections > > It seems you did not address the comment about possible NULL pdata I > put on v4? Yes I did in patch 5: Philippe --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c @@ -716,6 +716,11 @@ static int mc13xxx_probe(struct spi_device *spi) enum mc13xxx_id id; int ret; + if (!pdata) { + dev_err(&spi->dev, "invalid platform data\n"); + return -EINVAL; + } + Thanks,