Skip to content

Commit

Permalink
drm/panfrost: simplify getting .driver_data
Browse files Browse the repository at this point in the history
We should get 'driver_data' 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>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210920090522.23784-6-wsa+renesas@sang-engineering.com
  • Loading branch information
Wolfram Sang authored and Steven Price committed Sep 20, 2021
1 parent d52ce70 commit fba5265
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/panfrost/panfrost_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,7 @@ void panfrost_device_reset(struct panfrost_device *pfdev)
#ifdef CONFIG_PM
int panfrost_device_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct panfrost_device *pfdev = platform_get_drvdata(pdev);
struct panfrost_device *pfdev = dev_get_drvdata(dev);

panfrost_device_reset(pfdev);
panfrost_devfreq_resume(pfdev);
Expand All @@ -409,8 +408,7 @@ int panfrost_device_resume(struct device *dev)

int panfrost_device_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct panfrost_device *pfdev = platform_get_drvdata(pdev);
struct panfrost_device *pfdev = dev_get_drvdata(dev);

if (!panfrost_job_is_idle(pfdev))
return -EBUSY;
Expand Down

0 comments on commit fba5265

Please sign in to comment.