aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-04-07 19:23:57 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-05-26 13:45:05 -0400
commit3271d382c3ffe61ef3d059ef47e635dbe031030e (patch)
tree2612b0030f0fd85ffe7722cbf195ac061a3eaf76 /drivers/gpio
parent7dc00a0d14992d0083fefccad7839ac837ea55bc (diff)
mfd: Use mfd cell platform_data for timberdale cells platform bits
With the addition of a device platform mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers. Acked-by: Richard Röjfors <richard.rojfors@pelagicore.com> 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 edbe1eae531f..0265872e57d1 100644
--- a/drivers/gpio/timbgpio.c
+++ b/drivers/gpio/timbgpio.c
@@ -23,7 +23,6 @@
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>
27#include <linux/irq.h> 26#include <linux/irq.h>
28#include <linux/io.h> 27#include <linux/io.h>
29#include <linux/timb_gpio.h> 28#include <linux/timb_gpio.h>
@@ -229,7 +228,7 @@ static int __devinit timbgpio_probe(struct platform_device *pdev)
229 struct gpio_chip *gc; 228 struct gpio_chip *gc;
230 struct timbgpio *tgpio; 229 struct timbgpio *tgpio;
231 struct resource *iomem; 230 struct resource *iomem;
232 struct timbgpio_platform_data *pdata = mfd_get_data(pdev); 231 struct timbgpio_platform_data *pdata = pdev->dev.platform_data;
233 int irq = platform_get_irq(pdev, 0); 232 int irq = platform_get_irq(pdev, 0);
234 233
235 if (!pdata || pdata->nr_pins > 32) { 234 if (!pdata || pdata->nr_pins > 32) {
@@ -320,13 +319,14 @@ err_mem:
320static int __devexit timbgpio_remove(struct platform_device *pdev) 319static int __devexit timbgpio_remove(struct platform_device *pdev)
321{ 320{
322 int err; 321 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 < tgpio->gpio.ngpio; i++) { 329 for (i = 0; i < pdata->nr_pins; i++) {
330 irq_set_chip(tgpio->irq_base + i, NULL); 330 irq_set_chip(tgpio->irq_base + i, NULL);
331 irq_set_chip_data(tgpio->irq_base + i, NULL); 331 irq_set_chip_data(tgpio->irq_base + i, NULL);
332 } 332 }