aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-01-20 20:01:22 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2014-01-20 20:01:22 +0000
commit1f4e6394ed9307fe3e9cd5ce732108060aa4fc78 (patch)
tree3aa914a49c264a412fa6535ac855a6054b35b97c /target/linux/generic
parentde266cd1c1ad326c67dd43a3027940c9f9098ed2 (diff)
downloadupstream-1f4e6394ed9307fe3e9cd5ce732108060aa4fc78.tar.gz
upstream-1f4e6394ed9307fe3e9cd5ce732108060aa4fc78.tar.bz2
upstream-1f4e6394ed9307fe3e9cd5ce732108060aa4fc78.zip
b53: use drvdata to store driver data
we should not abuse the platform_data pointer. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 39354
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c5
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_spi.c6
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_srab.c5
3 files changed, 6 insertions, 10 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c
index 1fd01581a2..272360f6de 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c
@@ -210,17 +210,16 @@ static int b53_mmap_probe(struct platform_device *pdev)
if (pdata)
dev->pdata = pdata;
- pdev->dev.platform_data = dev;
+ platform_set_drvdata(pdev, dev);
return b53_switch_register(dev);
}
static int b53_mmap_remove(struct platform_device *pdev)
{
- struct b53_device *dev = pdev->dev.platform_data;
+ struct b53_device *dev = platform_get_drvdata(pdev);
if (dev) {
- pdev->dev.platform_data = dev->pdata;
b53_switch_remove(dev);
}
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c b/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c
index 6050fea32e..8c6b171e75 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c
@@ -294,19 +294,17 @@ static int b53_spi_probe(struct spi_device *spi)
if (ret)
return ret;
- spi->dev.platform_data = dev;
+ spi_set_drvdata(spi, dev);
return 0;
}
static int b53_spi_remove(struct spi_device *spi)
{
- struct b53_device *dev = spi->dev.platform_data;
+ struct b53_device *dev = spi_get_drvdata(spi);
if (dev) {
- struct b53_platform_data *pdata = dev->pdata;
b53_switch_remove(dev);
- spi->dev.platform_data = pdata;
}
return 0;
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c b/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c
index f0743b7017..a68e27540a 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c
@@ -349,17 +349,16 @@ static int b53_srab_probe(struct platform_device *pdev)
if (pdata)
dev->pdata = pdata;
- pdev->dev.platform_data = dev;
+ platform_set_drvdata(pdev, dev);
return b53_switch_register(dev);
}
static int b53_srab_remove(struct platform_device *pdev)
{
- struct b53_device *dev = pdev->dev.platform_data;
+ struct b53_device *dev = platform_get_drvdata(pdev);
if (dev) {
- pdev->dev.platform_data = dev->pdata;
b53_switch_remove(dev);
}