Skip to content

Commit

Permalink
mfd: Use mfd cell platform_data for janz cells platform bits
Browse files Browse the repository at this point in the history
With the addition of a platform device 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.

Cc: Ira W. Snyder <iws@ovro.caltech.edu>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Samuel Ortiz committed May 26, 2011
1 parent c8a03c9 commit 3d2bdf7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions drivers/gpio/janz-ttl.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/mfd/core.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/slab.h>
Expand Down Expand Up @@ -150,7 +149,7 @@ static int __devinit ttl_probe(struct platform_device *pdev)
struct resource *res;
int ret;

pdata = mfd_get_data(pdev);
pdata = pdev->dev.platform_data;
if (!pdata) {
dev_err(dev, "no platform data\n");
ret = -ENXIO;
Expand Down
3 changes: 2 additions & 1 deletion drivers/mfd/janz-cmodio.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ static int __devinit cmodio_setup_subdevice(struct cmodio_device *priv,

/* Add platform data */
pdata->modno = modno;
cell->mfd_data = pdata;
cell->platform_data = pdata;
cell->pdata_size = sizeof(*pdata);

/* MODULbus registers -- PCI BAR3 is big-endian MODULbus access */
res->flags = IORESOURCE_MEM;
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/can/janz-ican3.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/mfd/core.h>

#include <linux/netdevice.h>
#include <linux/can.h>
Expand Down Expand Up @@ -1644,7 +1643,7 @@ static int __devinit ican3_probe(struct platform_device *pdev)
struct device *dev;
int ret;

pdata = mfd_get_data(pdev);
pdata = pdev->dev.platform_data;
if (!pdata)
return -ENXIO;

Expand Down

0 comments on commit 3d2bdf7

Please sign in to comment.