Received: by 10.192.165.156 with SMTP id m28csp782640imm; Thu, 19 Apr 2018 07:30:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx48rKxxpNDyXAr4eS9VECXEufq3EY0XJiL9mg1kTC5XTnND7cD6W0ARK/Xdnc6lCd4U9EA9t X-Received: by 10.99.97.8 with SMTP id v8mr5331976pgb.245.1524148208109; Thu, 19 Apr 2018 07:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148208; cv=none; d=google.com; s=arc-20160816; b=DUFrmCChdcJj5tfe2pN23FjUzvAh+TJTCpmcyzLdFL/b8J3AobPN79pnxJuUgET60H ueeXaBwn+nojL6qsU6RNo0EDXiMw9BCUYqOZ5bqb4FBKTYjnY8zYt8VJ52N7+cP4nM5J tUT21J9RzMfQ/P4tFcJmqij/kyswjDWGAjbeIKlmcsL+FTGs0ABU6hbrUJ86bp16Xs0e ZskUHZ7BHzamMm7IJjQGbPiRWLm6eNDA+MKPswa3VeICA69Zkul8MZJVFiVCTeaiHom0 3HmxyeCGbWfFX5/efehf793Xa7TskyYnRAHGKfRn9pHwVS9EAAkizAlUHBPU0zO6lhhJ d5FA== 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=PBSs2h9w431FxH2ZPIpCFbLggDsP4o/aV/rwOwcEWdQ=; b=hKoadTzeQuUFc4tUlzg4VkVNEB3IVhAFvIU6gn6MvFojaErfTM6IL1HUKJKp3uCU3A cuZkZNZ1AU7H5ZQnnBf3iJZ2ex0VrCsLIDpi+JT5qnwic44jv5Qoq3mGTrJVx1NBWWOa DUXaUexxCx3rlTto0oTgfBx15ujm0n8xBNyAUvEF0oIzgqh5nUcWh2B8G9wrdBe8/JNt lWQIHCyRKemELQktQ5htSWD3tvko/IMc0Qw/MF6MHOzBMCxd9ShEhyvwqpK2TN+9CmeL FbcTNd5Sz6eN50Oxue/K6Xdr/xk1goszCp0CMPfJ97vfNNew2H1maIpnmoygflq1u5ne ZWhg== 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 32-v6si3562982pld.65.2018.04.19.07.29.54; Thu, 19 Apr 2018 07:30:08 -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 S1753190AbeDSOGv (ORCPT + 99 others); Thu, 19 Apr 2018 10:06:51 -0400 Received: from sauhun.de ([88.99.104.3]:45232 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752725AbeDSOGu (ORCPT ); Thu, 19 Apr 2018 10:06:50 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 859453139AF; Thu, 19 Apr 2018 16:06:48 +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 , Miguel Ojeda Sandonis Subject: [PATCH 03/61] auxdisplay: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:33 +0200 Message-Id: <20180419140641.27926-4-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/auxdisplay/arm-charlcd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c index b3176ee92b90..26246ab7a066 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -329,8 +329,7 @@ static int __init charlcd_probe(struct platform_device *pdev) static int charlcd_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct charlcd *lcd = platform_get_drvdata(pdev); + struct charlcd *lcd = dev_get_drvdata(dev); /* Power the display off */ charlcd_4bit_command(lcd, HD_DISPCTRL); @@ -339,8 +338,7 @@ static int charlcd_suspend(struct device *dev) static int charlcd_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct charlcd *lcd = platform_get_drvdata(pdev); + struct charlcd *lcd = dev_get_drvdata(dev); /* Turn the display back on */ charlcd_4bit_command(lcd, HD_DISPCTRL | HD_DISPCTRL_ON); -- 2.11.0