Commit b2faabc8 authored by Wolfram Sang's avatar Wolfram Sang Committed by Bartlomiej Zolnierkiewicz

video: fbdev: 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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent c8b54776
...@@ -776,8 +776,7 @@ static void auok190x_recover(struct auok190xfb_par *par) ...@@ -776,8 +776,7 @@ static void auok190x_recover(struct auok190xfb_par *par)
*/ */
static int __maybe_unused auok190x_runtime_suspend(struct device *dev) static int __maybe_unused auok190x_runtime_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = dev_get_drvdata(dev);
struct fb_info *info = platform_get_drvdata(pdev);
struct auok190xfb_par *par = info->par; struct auok190xfb_par *par = info->par;
struct auok190x_board *board = par->board; struct auok190x_board *board = par->board;
u16 standby_param; u16 standby_param;
...@@ -823,8 +822,7 @@ static int __maybe_unused auok190x_runtime_suspend(struct device *dev) ...@@ -823,8 +822,7 @@ static int __maybe_unused auok190x_runtime_suspend(struct device *dev)
static int __maybe_unused auok190x_runtime_resume(struct device *dev) static int __maybe_unused auok190x_runtime_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = dev_get_drvdata(dev);
struct fb_info *info = platform_get_drvdata(pdev);
struct auok190xfb_par *par = info->par; struct auok190xfb_par *par = info->par;
struct auok190x_board *board = par->board; struct auok190x_board *board = par->board;
...@@ -857,8 +855,7 @@ static int __maybe_unused auok190x_runtime_resume(struct device *dev) ...@@ -857,8 +855,7 @@ static int __maybe_unused auok190x_runtime_resume(struct device *dev)
static int __maybe_unused auok190x_suspend(struct device *dev) static int __maybe_unused auok190x_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = dev_get_drvdata(dev);
struct fb_info *info = platform_get_drvdata(pdev);
struct auok190xfb_par *par = info->par; struct auok190xfb_par *par = info->par;
struct auok190x_board *board = par->board; struct auok190x_board *board = par->board;
int ret; int ret;
...@@ -897,8 +894,7 @@ static int __maybe_unused auok190x_suspend(struct device *dev) ...@@ -897,8 +894,7 @@ static int __maybe_unused auok190x_suspend(struct device *dev)
static int __maybe_unused auok190x_resume(struct device *dev) static int __maybe_unused auok190x_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = dev_get_drvdata(dev);
struct fb_info *info = platform_get_drvdata(pdev);
struct auok190xfb_par *par = info->par; struct auok190xfb_par *par = info->par;
struct auok190x_board *board = par->board; struct auok190x_board *board = par->board;
......
...@@ -2354,8 +2354,7 @@ static int sh_mobile_lcdc_resume(struct device *dev) ...@@ -2354,8 +2354,7 @@ static int sh_mobile_lcdc_resume(struct device *dev)
static int sh_mobile_lcdc_runtime_suspend(struct device *dev) static int sh_mobile_lcdc_runtime_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct sh_mobile_lcdc_priv *priv = dev_get_drvdata(dev);
struct sh_mobile_lcdc_priv *priv = platform_get_drvdata(pdev);
/* turn off LCDC hardware */ /* turn off LCDC hardware */
lcdc_write(priv, _LDCNT1R, 0); lcdc_write(priv, _LDCNT1R, 0);
...@@ -2365,8 +2364,7 @@ static int sh_mobile_lcdc_runtime_suspend(struct device *dev) ...@@ -2365,8 +2364,7 @@ static int sh_mobile_lcdc_runtime_suspend(struct device *dev)
static int sh_mobile_lcdc_runtime_resume(struct device *dev) static int sh_mobile_lcdc_runtime_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct sh_mobile_lcdc_priv *priv = dev_get_drvdata(dev);
struct sh_mobile_lcdc_priv *priv = platform_get_drvdata(pdev);
__sh_mobile_lcdc_start(priv); __sh_mobile_lcdc_start(priv);
......
...@@ -572,8 +572,7 @@ EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_update); ...@@ -572,8 +572,7 @@ EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_update);
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int sh_mobile_meram_suspend(struct device *dev) static int sh_mobile_meram_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct sh_mobile_meram_priv *priv = dev_get_drvdata(dev);
struct sh_mobile_meram_priv *priv = platform_get_drvdata(pdev);
unsigned int i, j; unsigned int i, j;
for (i = 0; i < MERAM_REGS_SIZE; i++) for (i = 0; i < MERAM_REGS_SIZE; i++)
...@@ -596,8 +595,7 @@ static int sh_mobile_meram_suspend(struct device *dev) ...@@ -596,8 +595,7 @@ static int sh_mobile_meram_suspend(struct device *dev)
static int sh_mobile_meram_resume(struct device *dev) static int sh_mobile_meram_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct sh_mobile_meram_priv *priv = dev_get_drvdata(dev);
struct sh_mobile_meram_priv *priv = platform_get_drvdata(pdev);
unsigned int i, j; unsigned int i, j;
for (i = 0; i < 32; i++) { for (i = 0; i < 32; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment