From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933687AbbHLITK (ORCPT ); Wed, 12 Aug 2015 04:19:10 -0400 Received: from ozlabs.org ([103.22.144.67]:41985 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753878AbbHLITI convert rfc822-to-8bit (ORCPT ); Wed, 12 Aug 2015 04:19:08 -0400 Date: Wed, 12 Aug 2015 18:19:05 +1000 From: Stephen Rothwell To: Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= Cc: Linus Walleij , Gustavo Padovan , Frederic Danis , Marcel Holtmann , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH] Bluetooth: hci_bcm: improve use of gpios API Message-ID: <20150812181905.78ade990@canb.auug.org.au> In-Reply-To: <1439364056-8564-1-git-send-email-u.kleine-koenig@pengutronix.de> References: <20150812165949.0d66f2be@canb.auug.org.au> <1439364056-8564-1-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Uwe, On Wed, 12 Aug 2015 09:20:56 +0200 Uwe Kleine-König wrote: > > devm_gpiod_get currently has an optional parameter to set initial > direction and value for the requested gpio. Make use of this to simplify > the driver and make it not fail to build when this parameter is made > mandatory (which is scheduled for 4.3-rc1). > > Moreover use the _optional variant of devm_gpiod_get to simplify error > handling (which also gets more strict for free). > > Signed-off-by: Uwe Kleine-König > --- > Hello, > > this is needed on top of commit 0395ffc1ee05 ("Bluetooth: hci_bcm: Add > PM for BCM devices") incombination with b17d1bf16cc7 ("gpio: make flags > mandatory for gpiod_get functions") which is currently sitting in next. > > Stephen fixed it up with a simpler patch, which works fine, but doesn't > benefit from the nice things devm_gpiod_get et al offer. > > Best regards > Uwe > > drivers/bluetooth/hci_bcm.c | 24 +++++++++--------------- > 1 file changed, 9 insertions(+), 15 deletions(-) I will use this instead of my simple patch tomorrow if the bluetooth maintainer has not applied it. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au