Skip to content

Commit 666e994

Browse files
Wolfram Sangmchehab
authored andcommitted
media: platform: s5p-mfc: 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 <[email protected]> Acked-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 2473394 commit 666e994

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/media/platform/s5p-mfc/s5p_mfc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,8 +1449,7 @@ static int s5p_mfc_remove(struct platform_device *pdev)
14491449

14501450
static int s5p_mfc_suspend(struct device *dev)
14511451
{
1452-
struct platform_device *pdev = to_platform_device(dev);
1453-
struct s5p_mfc_dev *m_dev = platform_get_drvdata(pdev);
1452+
struct s5p_mfc_dev *m_dev = dev_get_drvdata(dev);
14541453
int ret;
14551454

14561455
if (m_dev->num_inst == 0)
@@ -1484,8 +1483,7 @@ static int s5p_mfc_suspend(struct device *dev)
14841483

14851484
static int s5p_mfc_resume(struct device *dev)
14861485
{
1487-
struct platform_device *pdev = to_platform_device(dev);
1488-
struct s5p_mfc_dev *m_dev = platform_get_drvdata(pdev);
1486+
struct s5p_mfc_dev *m_dev = dev_get_drvdata(dev);
14891487

14901488
if (m_dev->num_inst == 0)
14911489
return 0;

0 commit comments

Comments
 (0)