Subject: Re: [PATCH] Bluetooth: hci_bcm: improve use of gpios API

From: Stephen Rothwell <[email-masked]>
Date: Wed, 12 Aug 2015 18:19:05 +1000

Hi Uwe,

On Wed, 12 Aug 2015 09:20:56 +0200 Uwe Kleine-König <[email-masked]> 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 <[email-masked]>
> ---
> 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                    [email-masked]