From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753928AbaIKAcQ (ORCPT ); Wed, 10 Sep 2014 20:32:16 -0400 Received: from mga01.intel.com ([192.55.52.88]:58499 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752019AbaIKAcN convert rfc822-to-8bit (ORCPT ); Wed, 10 Sep 2014 20:32:13 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="384440619" From: "Chen, Alvin" To: atull CC: Linus Walleij , Alexandre Courbot , Grant Likely , Rob Herring , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "Ong, Boon Leong" , "Kweh, Hock Leong" , Darren Hart , Sebastian Andrzej Siewior , "Westerberg, Mika" , "Shevchenko, Andriy" , Arnd Bergmann Subject: RE: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver Thread-Topic: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver Thread-Index: AQHPzVfQBzfVE95SwUGw/dcbz4wqaA== Date: Thu, 11 Sep 2014 00:32:06 +0000 Message-ID: <4656BEB6164FC34F8171C6538F1A595B2E98F95D@SHSMSX101.ccr.corp.intel.com> References: <1410286081-16653-1-git-send-email-alvin.chen@intel.com> <1410286081-16653-2-git-send-email-alvin.chen@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Hi Alvin, > > I did a quick test and this looks like it works for me (with device tree). > I had a couple of small fixes below. It is very appreciated to help testing. > Alan > > > > > - port->bgc.gc.ngpio = ngpio; > > - port->bgc.gc.of_node = port_np; > > +#ifdef CONFIG_OF_GPIO > > + port->bgc.gc.of_node = pp->node; > > +#endif > > Please use 'if (IS_ENABLED(CONFIG_OF_GPIO)) as a conditional as you do > elsewhere. OK. > > > static int dwapb_gpio_probe(struct platform_device *pdev) { > > + int i; > > struct resource *res; > > struct dwapb_gpio *gpio; > > - struct device_node *np; > > int err; > > - unsigned int offs = 0; > > + struct device *dev = &pdev->dev; > > + struct dwapb_platform_data *pdata = dev_get_platdata(dev); > > + bool is_pdata_alloc = !pdata; > > Please combine the int's in one line (int err, i;) and put them as the last one on > this list. It looks the same to the compiler of course, but more uniform for > human eyes :) OK.