Skip to content

Commit

Permalink
mfd: mfd_cell is now implicitly available to janz drivers
Browse files Browse the repository at this point in the history
The cell's platform_data is now accessed with a helper function;
change clients to use that, and remove the now-unused data_size.

Signed-off-by: Andres Salomon <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
dilinger authored and Samuel Ortiz committed Mar 23, 2011
1 parent 6a3521a commit 8615e4c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion drivers/gpio/janz-ttl.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#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 @@ -149,7 +150,7 @@ static int __devinit ttl_probe(struct platform_device *pdev)
struct resource *res;
int ret;

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

/* MODULbus registers -- PCI BAR3 is big-endian MODULbus access */
res->flags = IORESOURCE_MEM;
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/can/janz-ican3.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#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 @@ -1643,7 +1644,7 @@ static int __devinit ican3_probe(struct platform_device *pdev)
struct device *dev;
int ret;

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

Expand Down

0 comments on commit 8615e4c

Please sign in to comment.