Received: by 10.192.165.156 with SMTP id m28csp763111imm; Thu, 19 Apr 2018 07:12:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx49B/FEa7OBIdNR7NALorvtAQa9cSN2bG+oaD0qD+QOZcgxAIvNYtEyfohJaO4yjXzhl5MqR X-Received: by 10.99.100.65 with SMTP id y62mr5382382pgb.362.1524147129812; Thu, 19 Apr 2018 07:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147129; cv=none; d=google.com; s=arc-20160816; b=n6CbAZOuJFuRxLfiOql+CpDJKkL4TesD+3mpGehGr3gj9Kr3rUGlVWg2B7pI9dOEh1 zjarL3ERFkD+l1nYBlbreFY4UZs/6/nlo/Evb4TC1rxm3rpvoL2XtjW00h/Ri+jjP2mH IKwIuGE2MLO31+jJ/n1WrXvJSmPbNf7sCaluokk/bjV8On0n6+UV7gzVGDDV7actaU4n 4kYhhmP2wxYChBsi55nulQW/i2JpXdYvzoTyLMr/18WO78sUYAIdtzHIEQdxbpFVCHvC mq6XbFj5fu9iPvVu+dCvIr8TvrKWGFAeTZ6LYJNE94hdHhs/45C3131BXSt7UJ7WaWqo JpwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=dPwkQWhj6E8Vmi3A60n6Lu4iHewF8JVeLWtRY5S5t0w=; b=KwFhzL6qB32bZFQJU7ZjJOl+msesBXjf2hwW08RjT3VhX94Z8brkfdF/Mx4DsO54it UKLchI0xergLRiEYo7MC4n70JgPp+t9BfCwmVYIJ9CABCfi7+SeeLTf+FFbODMU1DtT7 Gxc08/3oz55vdrhgYSzOWuAQYFbI6UA0mPWQTHfcylPmppyo40TYdy0hAxHd4LMCeyIY ADrtHnqk1H2XpPpfBLa8ksxW5HNAf/qzrZb7gWVGQtDrzjcxTlUJpBA04BuWEnmU6YIc BNyIRZax/2q8bWoJ7+wUF04NTXgg5S2ZEbEs7aj8P4XcLGupvSeivmpob67aFweQ8yJg Hicw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7si1306320pgd.96.2018.04.19.07.11.56; Thu, 19 Apr 2018 07:12:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753792AbeDSOJz (ORCPT + 99 others); Thu, 19 Apr 2018 10:09:55 -0400 Received: from sauhun.de ([88.99.104.3]:45416 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753566AbeDSOHP (ORCPT ); Thu, 19 Apr 2018 10:07:15 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 300463139BE; Thu, 19 Apr 2018 16:07:14 +0200 (CEST) From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Wolfram Sang , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH 57/61] video: fbdev: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:27 +0200 Message-Id: <20180419140641.27926-58-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang --- Build tested only. buildbot is happy. Please apply individually. drivers/video/fbdev/auo_k190x.c | 12 ++++-------- drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 ++---- drivers/video/fbdev/sh_mobile_meram.c | 6 ++---- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/video/fbdev/auo_k190x.c b/drivers/video/fbdev/auo_k190x.c index 9d24d1b3e9ef..9bf6a6e02342 100644 --- a/drivers/video/fbdev/auo_k190x.c +++ b/drivers/video/fbdev/auo_k190x.c @@ -776,8 +776,7 @@ static void auok190x_recover(struct auok190xfb_par *par) */ static int __maybe_unused auok190x_runtime_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct fb_info *info = platform_get_drvdata(pdev); + struct fb_info *info = dev_get_drvdata(dev); struct auok190xfb_par *par = info->par; struct auok190x_board *board = par->board; u16 standby_param; @@ -823,8 +822,7 @@ static int __maybe_unused auok190x_runtime_suspend(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 = platform_get_drvdata(pdev); + struct fb_info *info = dev_get_drvdata(dev); struct auok190xfb_par *par = info->par; struct auok190x_board *board = par->board; @@ -857,8 +855,7 @@ static int __maybe_unused auok190x_runtime_resume(struct device *dev) static int __maybe_unused auok190x_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct fb_info *info = platform_get_drvdata(pdev); + struct fb_info *info = dev_get_drvdata(dev); struct auok190xfb_par *par = info->par; struct auok190x_board *board = par->board; int ret; @@ -897,8 +894,7 @@ static int __maybe_unused auok190x_suspend(struct device *dev) static int __maybe_unused auok190x_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct fb_info *info = platform_get_drvdata(pdev); + struct fb_info *info = dev_get_drvdata(dev); struct auok190xfb_par *par = info->par; struct auok190x_board *board = par->board; diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index c3a46506e47e..86bd4090b011 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -2354,8 +2354,7 @@ static int sh_mobile_lcdc_resume(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 = platform_get_drvdata(pdev); + struct sh_mobile_lcdc_priv *priv = dev_get_drvdata(dev); /* turn off LCDC hardware */ lcdc_write(priv, _LDCNT1R, 0); @@ -2365,8 +2364,7 @@ static int sh_mobile_lcdc_runtime_suspend(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 = platform_get_drvdata(pdev); + struct sh_mobile_lcdc_priv *priv = dev_get_drvdata(dev); __sh_mobile_lcdc_start(priv); diff --git a/drivers/video/fbdev/sh_mobile_meram.c b/drivers/video/fbdev/sh_mobile_meram.c index baadfb207b2e..f5d8bd7ef509 100644 --- a/drivers/video/fbdev/sh_mobile_meram.c +++ b/drivers/video/fbdev/sh_mobile_meram.c @@ -572,8 +572,7 @@ EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_update); #ifdef CONFIG_PM static int sh_mobile_meram_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct sh_mobile_meram_priv *priv = platform_get_drvdata(pdev); + struct sh_mobile_meram_priv *priv = dev_get_drvdata(dev); unsigned int i, j; for (i = 0; i < MERAM_REGS_SIZE; i++) @@ -596,8 +595,7 @@ static int sh_mobile_meram_suspend(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 = platform_get_drvdata(pdev); + struct sh_mobile_meram_priv *priv = dev_get_drvdata(dev); unsigned int i, j; for (i = 0; i < 32; i++) { -- 2.11.0