gpu: drm: vc4: simplify getting .drvdata

We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20180419140641.27926-17-wsa+renesas@sang-engineering.com
This commit is contained in:
Wolfram Sang 2018-04-19 16:05:46 +02:00 committed by Eric Anholt
parent 044c598905
commit 9f900de31d

View file

@ -318,8 +318,7 @@ dev_unref:
static void vc4_drm_unbind(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct drm_device *drm = platform_get_drvdata(pdev);
struct drm_device *drm = dev_get_drvdata(dev);
drm_dev_unregister(drm);