diff options
Diffstat (limited to 'drivers/gpio/tc35892-gpio.c')
-rw-r--r-- | drivers/gpio/tc35892-gpio.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpio/tc35892-gpio.c b/drivers/gpio/tc35892-gpio.c index 1be6288780de..7e10c935a047 100644 --- a/drivers/gpio/tc35892-gpio.c +++ b/drivers/gpio/tc35892-gpio.c | |||
@@ -322,6 +322,9 @@ static int __devinit tc35892_gpio_probe(struct platform_device *pdev) | |||
322 | goto out_freeirq; | 322 | goto out_freeirq; |
323 | } | 323 | } |
324 | 324 | ||
325 | if (pdata->setup) | ||
326 | pdata->setup(tc35892, tc35892_gpio->chip.base); | ||
327 | |||
325 | platform_set_drvdata(pdev, tc35892_gpio); | 328 | platform_set_drvdata(pdev, tc35892_gpio); |
326 | 329 | ||
327 | return 0; | 330 | return 0; |
@@ -338,9 +341,14 @@ out_free: | |||
338 | static int __devexit tc35892_gpio_remove(struct platform_device *pdev) | 341 | static int __devexit tc35892_gpio_remove(struct platform_device *pdev) |
339 | { | 342 | { |
340 | struct tc35892_gpio *tc35892_gpio = platform_get_drvdata(pdev); | 343 | struct tc35892_gpio *tc35892_gpio = platform_get_drvdata(pdev); |
344 | struct tc35892 *tc35892 = tc35892_gpio->tc35892; | ||
345 | struct tc35892_gpio_platform_data *pdata = tc35892->pdata->gpio; | ||
341 | int irq = platform_get_irq(pdev, 0); | 346 | int irq = platform_get_irq(pdev, 0); |
342 | int ret; | 347 | int ret; |
343 | 348 | ||
349 | if (pdata->remove) | ||
350 | pdata->remove(tc35892, tc35892_gpio->chip.base); | ||
351 | |||
344 | ret = gpiochip_remove(&tc35892_gpio->chip); | 352 | ret = gpiochip_remove(&tc35892_gpio->chip); |
345 | if (ret < 0) { | 353 | if (ret < 0) { |
346 | dev_err(tc35892_gpio->dev, | 354 | dev_err(tc35892_gpio->dev, |