Received: by 10.192.165.156 with SMTP id m28csp780921imm; Thu, 19 Apr 2018 07:28:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+rcmHNTACoJBzWeCjPPY1QGxd/cQnm9Y/GVifEvoO2MNKHOEBUmjVY6qr4MqIHqxGeVeiK X-Received: by 2002:a17:902:5a46:: with SMTP id f6-v6mr1181355plm.85.1524148111281; Thu, 19 Apr 2018 07:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148111; cv=none; d=google.com; s=arc-20160816; b=mqYRQyFtJ7uG43QJj2OYd1JQUh2ot5r3hdY4mxvw6d5Z74YG6/I346+H/s/BaEMuQX UI31VeEIqqOeJxd72yVPjv10qCm5FtEZJf0wqwfiuWPW8RCVH5XpLsFVrc/w1dq6m+XJ lAN9NXnutYXXBT7/iO45IMRzspniotgO8GTLS3PWC8T/2OJIZKXN9J8sR6uCQkqAxZOw /3rg6wqHh2IyFp5YXVlBhtY/HPeO72vPvqQ+aWjM9fde6GZsHQ8dPLudL5Eb8FXvCVfk 9hYWcNi6pcoXBlELMMsSc9cO5uFFba+Cvk5aE2vVrRv8gD7BdjV8SfB2D+V91HhtAVaU 1f/A== 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=V0FvJSgdxGAYq9etFJSpFGZ6QQGpJ6F3peMCz17lhAQ=; b=Dn9iFWbZKm+XFAX1zpTYM6f67/EJ82u6mGGJDiBVwHoLPqVL9gnkS05bF8b/L9Z5Li PlLI0hfJYywvAWWCpTE1hW+bHebk4VFI7VMVLo9xmBTwL1mAdbNQfUSDK0Vh9DmL0Lpv N6EKAJ8b1dv5c1OPJEMSuLSC8TzR/vt+TRy8eoeVFbZXnnoAG1eV0VpZqFsttlsJw92m JZ437Nghgfhc0PAy5g9kLK5cMI/2mVMBzQyx3WNdY8YSoqb1U2TmkF+a0Ct2xUSZTsYZ Gvr6xDQRoNLSpH24z27HCrW+JhyvE/G+3XoGx+qmkeRaCYeL0f4od9Di4aQCHdGm5ZzA Qv0w== 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 m37-v6si3712631pla.346.2018.04.19.07.28.17; Thu, 19 Apr 2018 07:28:31 -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 S1753491AbeDSO1O (ORCPT + 99 others); Thu, 19 Apr 2018 10:27:14 -0400 Received: from sauhun.de ([88.99.104.3]:45270 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752831AbeDSOGw (ORCPT ); Thu, 19 Apr 2018 10:06:52 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 669B23139B1; Thu, 19 Apr 2018 16:06:49 +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 , Kukjin Kim , Krzysztof Kozlowski , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Michael Turquette , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 05/61] clk: samsung: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:35 +0200 Message-Id: <20180419140641.27926-6-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/clk/samsung/clk-s3c2410-dclk.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/samsung/clk-s3c2410-dclk.c b/drivers/clk/samsung/clk-s3c2410-dclk.c index 077df3e539a7..f41d89cef0f1 100644 --- a/drivers/clk/samsung/clk-s3c2410-dclk.c +++ b/drivers/clk/samsung/clk-s3c2410-dclk.c @@ -219,8 +219,7 @@ static int s3c24xx_dclk1_div_notify(struct notifier_block *nb, #ifdef CONFIG_PM_SLEEP static int s3c24xx_dclk_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct s3c24xx_dclk *s3c24xx_dclk = platform_get_drvdata(pdev); + struct s3c24xx_dclk *s3c24xx_dclk = dev_get_drvdata(dev); s3c24xx_dclk->reg_save = readl_relaxed(s3c24xx_dclk->base); return 0; @@ -228,8 +227,7 @@ static int s3c24xx_dclk_suspend(struct device *dev) static int s3c24xx_dclk_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct s3c24xx_dclk *s3c24xx_dclk = platform_get_drvdata(pdev); + struct s3c24xx_dclk *s3c24xx_dclk = dev_get_drvdata(dev); writel_relaxed(s3c24xx_dclk->reg_save, s3c24xx_dclk->base); return 0; -- 2.11.0