diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2014-01-20 20:01:22 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2014-01-20 20:01:22 +0000 |
commit | e6007e192a5d55e48ae3c67d1a78838b0a50dbdc (patch) | |
tree | a4b793e29729de59e32c7a561f8a4f4e8ff1ad52 /target/linux/generic/files/drivers/net/phy/b53/b53_srab.c | |
parent | 6bb0e2caf480b956055fc26d1f2e9c10b253c838 (diff) | |
download | upstream-e6007e192a5d55e48ae3c67d1a78838b0a50dbdc.tar.gz upstream-e6007e192a5d55e48ae3c67d1a78838b0a50dbdc.tar.bz2 upstream-e6007e192a5d55e48ae3c67d1a78838b0a50dbdc.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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39354 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/b53/b53_srab.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/b53/b53_srab.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); } |