diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-01-20 20:01:22 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2014-01-20 20:01:22 +0000 |
commit | 1f4e6394ed9307fe3e9cd5ce732108060aa4fc78 (patch) | |
tree | 3aa914a49c264a412fa6535ac855a6054b35b97c /target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c | |
parent | de266cd1c1ad326c67dd43a3027940c9f9098ed2 (diff) | |
download | master-31e0f0ae-1f4e6394ed9307fe3e9cd5ce732108060aa4fc78.tar.gz master-31e0f0ae-1f4e6394ed9307fe3e9cd5ce732108060aa4fc78.tar.bz2 master-31e0f0ae-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/files/drivers/net/phy/b53/b53_mmap.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c | 5 |
1 files changed, 2 insertions, 3 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); } |