@@ -149,7 +149,7 @@ static int __devinit ttl_probe(struct platform_device *pdev)
struct resource *res;
int ret;
- pdata = pdev->dev.platform_data;
+ pdata = platform_get_drvdata(pdev);
if (!pdata) {
dev_err(dev, "no platform data\n");
ret = -ENXIO;
@@ -86,8 +86,7 @@ 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);
+ cell->driver_data = pdata;
/* MODULbus registers -- PCI BAR3 is big-endian MODULbus access */
res->flags = IORESOURCE_MEM;
@@ -1643,7 +1643,7 @@ static int __devinit ican3_probe(struct platform_device *pdev)
struct device *dev;
int ret;
- pdata = pdev->dev.platform_data;
+ pdata = platform_get_drvdata(pdev);
if (!pdata)
return -ENXIO;
No need to explicitly set the cell's platform_data/data_size. In this case, move the various platform_data pointers to driver_data. All of the clients which make use of it are also changed. Signed-off-by: Andres Salomon <dilinger@queued.net> --- drivers/gpio/janz-ttl.c | 2 +- drivers/mfd/janz-cmodio.c | 3 +-- drivers/net/can/janz-ican3.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)