diff mbox

gpio: ts4800: Drop redundant code to set already initialized gpio_chip fields

Message ID 1455949366.14139.1.camel@ingics.com
State New
Headers show

Commit Message

Axel Lin Feb. 20, 2016, 6:22 a.m. UTC
Both chip->base and chip->label are correctly set by bgpio_init().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/gpio/gpio-ts4800.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Julien Grossholtz Feb. 22, 2016, 4:13 p.m. UTC | #1
Hello,

Thank you for this patch. I checked and it still works as expected.

----- Original Message -----
> From: "Axel Lin" <axel.lin@ingics.com>
> To: "Linus Walleij" <linus.walleij@linaro.org>
> Cc: "Julien Grossholtz" <julien.grossholtz@savoirfairelinux.com>, "Alexandre Courbot" <gnurou@gmail.com>,
> linux-gpio@vger.kernel.org
> Sent: Saturday, February 20, 2016 1:22:46 AM
> Subject: [PATCH] gpio: ts4800: Drop redundant code to set already initialized gpio_chip fields

> Both chip->base and chip->label are correctly set by bgpio_init().
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Julien Grossholtz <julien.grossholtz@savoirfairelinux.com>
> ---
> drivers/gpio/gpio-ts4800.c | 2 --
> 1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-ts4800.c b/drivers/gpio/gpio-ts4800.c
> index 9da79e4..1478245 100644
> --- a/drivers/gpio/gpio-ts4800.c
> +++ b/drivers/gpio/gpio-ts4800.c
> @@ -54,8 +54,6 @@ static int ts4800_gpio_probe(struct platform_device *pdev)
> 		return retval;
> 	}
> 
> -	chip->base = -1;
> -	chip->label = dev_name(&pdev->dev);
> 	chip->ngpio = ngpios;
> 
> 	platform_set_drvdata(pdev, chip);
> --
> 2.1.4
--
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
Linus Walleij Feb. 25, 2016, 9:52 a.m. UTC | #2
On Sat, Feb 20, 2016 at 7:22 AM, Axel Lin <axel.lin@ingics.com> wrote:

> Both chip->base and chip->label are correctly set by bgpio_init().
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Patch applied with Julien's Test tag.

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
diff mbox

Patch

diff --git a/drivers/gpio/gpio-ts4800.c b/drivers/gpio/gpio-ts4800.c
index 9da79e4..1478245 100644
--- a/drivers/gpio/gpio-ts4800.c
+++ b/drivers/gpio/gpio-ts4800.c
@@ -54,8 +54,6 @@  static int ts4800_gpio_probe(struct platform_device *pdev)
 		return retval;
 	}
 
-	chip->base = -1;
-	chip->label = dev_name(&pdev->dev);
 	chip->ngpio = ngpios;
 
 	platform_set_drvdata(pdev, chip);