aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2011-02-17 22:07:15 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 05:41:52 -0400
commite46dccff341068d8530610a822965794f70b998f (patch)
treea1f567ef8299629456f8a0309761f7d217a95006 /drivers/gpio
parent07ae2a08deb141f22d7974615bd3006e8dce3883 (diff)
mfd: mfd_cell is now implicitly available to timberdale drivers
The cell's platform_data is now accessed with a helper function; change clients to use that, and remove the now-unused data_size. Note that the mfd's platform_data is marked __devinitdata. This is still correct in all cases except for the timbgpio driver, whose remove hook has been changed to no longer reference the pdata. Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/timbgpio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/timbgpio.c b/drivers/gpio/timbgpio.c
index 58c8f30352dd..ffcd815b8b8b 100644
--- a/drivers/gpio/timbgpio.c
+++ b/drivers/gpio/timbgpio.c
@@ -23,6 +23,7 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/mfd/core.h>
26#include <linux/irq.h> 27#include <linux/irq.h>
27#include <linux/io.h> 28#include <linux/io.h>
28#include <linux/timb_gpio.h> 29#include <linux/timb_gpio.h>
@@ -228,7 +229,7 @@ static int __devinit timbgpio_probe(struct platform_device *pdev)
228 struct gpio_chip *gc; 229 struct gpio_chip *gc;
229 struct timbgpio *tgpio; 230 struct timbgpio *tgpio;
230 struct resource *iomem; 231 struct resource *iomem;
231 struct timbgpio_platform_data *pdata = pdev->dev.platform_data; 232 struct timbgpio_platform_data *pdata = mfd_get_data(pdev);
232 int irq = platform_get_irq(pdev, 0); 233 int irq = platform_get_irq(pdev, 0);
233 234
234 if (!pdata || pdata->nr_pins > 32) { 235 if (!pdata || pdata->nr_pins > 32) {
@@ -319,14 +320,13 @@ err_mem:
319static int __devexit timbgpio_remove(struct platform_device *pdev) 320static int __devexit timbgpio_remove(struct platform_device *pdev)
320{ 321{
321 int err; 322 int err;
322 struct timbgpio_platform_data *pdata = pdev->dev.platform_data;
323 struct timbgpio *tgpio = platform_get_drvdata(pdev); 323 struct timbgpio *tgpio = platform_get_drvdata(pdev);
324 struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 324 struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
325 int irq = platform_get_irq(pdev, 0); 325 int irq = platform_get_irq(pdev, 0);
326 326
327 if (irq >= 0 && tgpio->irq_base > 0) { 327 if (irq >= 0 && tgpio->irq_base > 0) {
328 int i; 328 int i;
329 for (i = 0; i < pdata->nr_pins; i++) { 329 for (i = 0; i < tgpio->gpio.ngpio; i++) {
330 set_irq_chip(tgpio->irq_base + i, NULL); 330 set_irq_chip(tgpio->irq_base + i, NULL);
331 set_irq_chip_data(tgpio->irq_base + i, NULL); 331 set_irq_chip_data(tgpio->irq_base + i, NULL);
332 } 332 }