Received: by 10.192.165.156 with SMTP id m28csp766117imm; Thu, 19 Apr 2018 07:14:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+czpgwBcZl4LBVZBBHI4cRIF9J4cWyNa2/GD3yQv74eDKrVEcw5Hy/Soaacikkd0AiSMUP X-Received: by 10.99.126.73 with SMTP id o9mr5317219pgn.168.1524147284109; Thu, 19 Apr 2018 07:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147284; cv=none; d=google.com; s=arc-20160816; b=UX5G6GnyNvCKKI2dAp1lCUVqTutHuZg1qg1/fUsVibAMdyuNjmH7ZvuwAieHmkhiQs 9aiTsLcTcS7Z0V9FAnK5w/QcgPRB/nS3Nvef+7nO2S5xMPpynvH1kdhbZKvaTN0zpDRr A2fExggfZvcAH6VGSNFVFmI3INr3CHMWfJiYMuytbg+UrUP6GM20vJhvwi8v1tA+qKQ9 sXF1cUQ0bpuV0PchyJ3KseqD2o5k14beYkCYpqC/H4u4TWLvbamRo/myp0Hr8lWIDrFx TMvIVbXtet9cRpuXUwjgRMkWzoqAfyYan593Idzxz54c/sQ0KAincdaVYHam1q1NIjqO U2bw== 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=8QbpPlTQFHAG+dg0b7OrdlYBh21piKM1tCY3nh7jWqE=; b=q0YfEgIePhR+Lb55L+FNmb1fgiKcEsPqHK7datOkb5WQYjfeeCJSiFz11NvHSIIvGN VHPlTVm3+o6+YXkJKk2c83Gyso9fHAXPtZvs06P8Gnd5x02zoUpUYhf6YmZFoHFB5jGM d8pySry07pYYpIhJBPn7BFXVTtpYcCWcb7hkMmAUikXD8/Z8iH6Rah4einOszqJJpLZD oSuBE2Bj+908LF5E2cRmRbMWy4w+yS9rSQOOt43W/q5EnRaXclQmpvOiAahBOfWfCv/9 UVaokkb6YnWlc9f1djjpnLVPc1jvEL+MN/WtXUkTh4wJdirKoPkFiYVAFJveo+UCPgeh ckPA== 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 be3-v6si3369709plb.75.2018.04.19.07.14.30; Thu, 19 Apr 2018 07:14:44 -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 S1753889AbeDSOM6 (ORCPT + 99 others); Thu, 19 Apr 2018 10:12:58 -0400 Received: from sauhun.de ([88.99.104.3]:45448 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752958AbeDSOHJ (ORCPT ); Thu, 19 Apr 2018 10:07:09 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id B47AE3139CE; Thu, 19 Apr 2018 16:07:08 +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 , Srinivas Kandagatla , alsa-devel@alsa-project.org Subject: [PATCH 45/61] slimbus: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:15 +0200 Message-Id: <20180419140641.27926-46-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/slimbus/qcom-ctrl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c index ffb46f915334..45c38fff15d2 100644 --- a/drivers/slimbus/qcom-ctrl.c +++ b/drivers/slimbus/qcom-ctrl.c @@ -655,8 +655,7 @@ static int qcom_slim_remove(struct platform_device *pdev) #ifdef CONFIG_PM static int qcom_slim_runtime_suspend(struct device *device) { - struct platform_device *pdev = to_platform_device(device); - struct qcom_slim_ctrl *ctrl = platform_get_drvdata(pdev); + struct qcom_slim_ctrl *ctrl = dev_get_drvdata(device); int ret; dev_dbg(device, "pm_runtime: suspending...\n"); @@ -673,8 +672,7 @@ static int qcom_slim_runtime_suspend(struct device *device) static int qcom_slim_runtime_resume(struct device *device) { - struct platform_device *pdev = to_platform_device(device); - struct qcom_slim_ctrl *ctrl = platform_get_drvdata(pdev); + struct qcom_slim_ctrl *ctrl = dev_get_drvdata(device); int ret = 0; dev_dbg(device, "pm_runtime: resuming...\n"); -- 2.11.0