Message ID | 1412087707-8313-1-git-send-email-pramod.gurav@smartplayin.com |
---|---|
State | Rejected, archived |
Headers | show |
On Tue, Sep 30, 2014 at 7:35 AM, Pramod Gurav <pramod.gurav@smartplayin.com> wrote: > Get rid of using return value from gpiochip_remove() as it returns > void. > Looks good to me. I will merge it. But what's in the first patch. I just got this second patch in my email inbox. -Bryan > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Alexandre Courbot <gnurou@gmail.com> > Cc: Bryan Wu <cooloney@gmail.com> > Cc: Richard Purdie <rpurdie@rpsys.net> > Cc: linux-leds@vger.kernel.org > > Cc: linux-gpio@vger.kernel.org > > Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> > --- > drivers/leds/leds-pca9532.c | 10 ++-------- > drivers/leds/leds-tca6507.c | 7 ++----- > 2 files changed, 4 insertions(+), 13 deletions(-) > > diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c > index 4a0e786..5a6363d 100644 > --- a/drivers/leds/leds-pca9532.c > +++ b/drivers/leds/leds-pca9532.c > @@ -319,14 +319,8 @@ static int pca9532_destroy_devices(struct pca9532_data *data, int n_devs) > } > > #ifdef CONFIG_LEDS_PCA9532_GPIO > - if (data->gpio.dev) { > - int err = gpiochip_remove(&data->gpio); > - if (err) { > - dev_err(&data->client->dev, "%s failed, %d\n", > - "gpiochip_remove()", err); > - return err; > - } > - } > + if (data->gpio.dev) > + gpiochip_remove(&data->gpio); > #endif > > return 0; > diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c > index 3d9e267..20fa8e7 100644 > --- a/drivers/leds/leds-tca6507.c > +++ b/drivers/leds/leds-tca6507.c > @@ -667,11 +667,8 @@ static int tca6507_probe_gpios(struct i2c_client *client, > > static void tca6507_remove_gpio(struct tca6507_chip *tca) > { > - if (tca->gpio.ngpio) { > - int err = gpiochip_remove(&tca->gpio); > - dev_err(&tca->client->dev, "%s failed, %d\n", > - "gpiochip_remove()", err); > - } > + if (tca->gpio.ngpio) > + gpiochip_remove(&tca->gpio); > } > #else /* CONFIG_GPIOLIB */ > static int tca6507_probe_gpios(struct i2c_client *client, > -- > 1.7.9.5 > -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Sep 30, 2014 at 11:21 PM, Bryan Wu <cooloney@gmail.com> wrote: > On Tue, Sep 30, 2014 at 7:35 AM, Pramod Gurav > <pramod.gurav@smartplayin.com> wrote: >> Get rid of using return value from gpiochip_remove() as it returns >> void. > > Looks good to me. I will merge it. Please don't. The issue is already fixed through the GPIO tree, where the API change is. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Oct 2, 2014 at 12:12 AM, Linus Walleij <linus.walleij@linaro.org> wrote: > On Tue, Sep 30, 2014 at 11:21 PM, Bryan Wu <cooloney@gmail.com> wrote: >> On Tue, Sep 30, 2014 at 7:35 AM, Pramod Gurav >> <pramod.gurav@smartplayin.com> wrote: >>> Get rid of using return value from gpiochip_remove() as it returns >>> void. >> >> Looks good to me. I will merge it. > > Please don't. > > The issue is already fixed through the GPIO tree, where the > API change is. > Oh, really. I wasn't aware that. Let me drop this change then. Thanks, -Bryan -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c index 4a0e786..5a6363d 100644 --- a/drivers/leds/leds-pca9532.c +++ b/drivers/leds/leds-pca9532.c @@ -319,14 +319,8 @@ static int pca9532_destroy_devices(struct pca9532_data *data, int n_devs) } #ifdef CONFIG_LEDS_PCA9532_GPIO - if (data->gpio.dev) { - int err = gpiochip_remove(&data->gpio); - if (err) { - dev_err(&data->client->dev, "%s failed, %d\n", - "gpiochip_remove()", err); - return err; - } - } + if (data->gpio.dev) + gpiochip_remove(&data->gpio); #endif return 0; diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c index 3d9e267..20fa8e7 100644 --- a/drivers/leds/leds-tca6507.c +++ b/drivers/leds/leds-tca6507.c @@ -667,11 +667,8 @@ static int tca6507_probe_gpios(struct i2c_client *client, static void tca6507_remove_gpio(struct tca6507_chip *tca) { - if (tca->gpio.ngpio) { - int err = gpiochip_remove(&tca->gpio); - dev_err(&tca->client->dev, "%s failed, %d\n", - "gpiochip_remove()", err); - } + if (tca->gpio.ngpio) + gpiochip_remove(&tca->gpio); } #else /* CONFIG_GPIOLIB */ static int tca6507_probe_gpios(struct i2c_client *client,
Get rid of using return value from gpiochip_remove() as it returns void. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Bryan Wu <cooloney@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: linux-leds@vger.kernel.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> --- drivers/leds/leds-pca9532.c | 10 ++-------- drivers/leds/leds-tca6507.c | 7 ++----- 2 files changed, 4 insertions(+), 13 deletions(-)