From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755145AbbHLOjo (ORCPT ); Wed, 12 Aug 2015 10:39:44 -0400 Received: from senator.holtmann.net ([87.106.208.187]:38016 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752979AbbHLOjm convert rfc822-to-8bit (ORCPT ); Wed, 12 Aug 2015 10:39:42 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: [PATCH] Bluetooth: hci_bcm: improve use of gpios API From: Marcel Holtmann In-Reply-To: <1439364056-8564-1-git-send-email-u.kleine-koenig@pengutronix.de> Date: Wed, 12 Aug 2015 07:39:31 -0700 Cc: Stephen Rothwell , Linus Walleij , "Gustavo F. Padovan" , Frederic Danis , linux-next@vger.kernel.org, inux Kernel Mailing List , linux-bluetooth@vger.kernel.org, kernel@pengutronix.de Content-Transfer-Encoding: 8BIT Message-Id: <342A6333-EC23-4743-8BD2-FC220A2F8B82@holtmann.org> References: <20150812165949.0d66f2be@canb.auug.org.au> <1439364056-8564-1-git-send-email-u.kleine-koenig@pengutronix.de> To: =?utf-8?Q?Uwe_Kleine-K=C3=B6nig?= X-Mailer: Apple Mail (2.2102) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Uwe, > 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. patch has been applied to bluetooth-next tree. Regards Marcel