Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panfrost: simplify getting .driver_data

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

authored by

Wolfram Sang and committed by
Steven Price
fba5265f d52ce709

+2 -4
+2 -4
drivers/gpu/drm/panfrost/panfrost_device.c
··· 398 398 #ifdef CONFIG_PM 399 399 int panfrost_device_resume(struct device *dev) 400 400 { 401 - struct platform_device *pdev = to_platform_device(dev); 402 - struct panfrost_device *pfdev = platform_get_drvdata(pdev); 401 + struct panfrost_device *pfdev = dev_get_drvdata(dev); 403 402 404 403 panfrost_device_reset(pfdev); 405 404 panfrost_devfreq_resume(pfdev); ··· 408 409 409 410 int panfrost_device_suspend(struct device *dev) 410 411 { 411 - struct platform_device *pdev = to_platform_device(dev); 412 - struct panfrost_device *pfdev = platform_get_drvdata(pdev); 412 + struct panfrost_device *pfdev = dev_get_drvdata(dev); 413 413 414 414 if (!panfrost_job_is_idle(pfdev)) 415 415 return -EBUSY;