Received: by 10.192.165.156 with SMTP id m28csp779806imm; Thu, 19 Apr 2018 07:27:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx48q+okL/gsXajTFN+HZ1Z8wRNN2ucHpbEhDXe3WFTff9cNaRP0wzwBX2e3Mxmoc6YTasLHt X-Received: by 10.99.97.151 with SMTP id v145mr5447895pgb.35.1524148044182; Thu, 19 Apr 2018 07:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148044; cv=none; d=google.com; s=arc-20160816; b=X3oP/f+g4gAZVSVGqwB+PYUTDnuRaKrya1+P01jeZt934JwO2/g+6NnvXZDCHGd/KF U7fVaPUMzyBY2+9X5JhIMH+pRkC59W2i3O/yPtXrQwO0SCGOslWVPxUegfDIXV/Xq6v7 x0ug82vZZiFeMhSzBxM0WRW+moh+T7FK9a+i2KOVbCZvh68u1qOrpLvfouyqu+UUl4ah P8BWxknvf2IZY1thdZP0ixyvy6r3dzFVfPMvOCSeMZVic3PPdBHhcpiIJfpXKkRPiSyo pDesVPV2kVCPGdJPfUZ/s4G2qGXJ88sUQ/LZlaYAyy7IOHPT8gIKFdzMePt5rMOCDzRo gi6w== 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=uM/U35sk5tWkY6asmO2Y7bgiyJRT+1qb0xw0xElV3PY=; b=yUTq4BZIG/q+OY0yIoMpTlCbFtKkDh+eiTayCRta/U5sZAEbJY+5rCsoxikRo3flTn dh+jN5ddoOR/ZZILUeB/WY+9/XmWt6HiV4Oo3eNO6i3R2J5zhHjLfX8K1dILvSRgQy1m eygFsj9Y6qb7SFx/xU1JyRExS8YacEI0+dyraIQW5usKUZBOPR2xtcQak4tajhSUikSe 20YvU7nV2LuN9mg7G92FX2YH/ZPpoqF5MSiTx/kOw+0n+ep5nyJnteIMJIKe+hdH7YNp 2eDQufumZrvF+24yua8+L/Hy7R3rPfho1e/yxmoj+ZyheGyJWO94ZDKVUv+jYYR8eriu wmZg== 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 w14si3138356pgc.633.2018.04.19.07.27.10; Thu, 19 Apr 2018 07:27:24 -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 S1753273AbeDSO0H (ORCPT + 99 others); Thu, 19 Apr 2018 10:26:07 -0400 Received: from sauhun.de ([88.99.104.3]:45302 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753205AbeDSOGx (ORCPT ); Thu, 19 Apr 2018 10:06:53 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 6586C3139B5; Thu, 19 Apr 2018 16:06:51 +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 , Andy Gross , David Brown , Vinod Koul , Dan Williams , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, dmaengine@vger.kernel.org Subject: [PATCH 09/61] dmaengine: qcom: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:39 +0200 Message-Id: <20180419140641.27926-10-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/dma/qcom/hidma.c | 3 +-- drivers/dma/qcom/hidma_mgmt_sys.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 963cc5228d05..43d4b00b8138 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c @@ -616,8 +616,7 @@ static irqreturn_t hidma_chirq_handler_msi(int chirq, void *arg) static ssize_t hidma_show_values(struct device *dev, struct device_attribute *attr, char *buf) { - struct platform_device *pdev = to_platform_device(dev); - struct hidma_dev *mdev = platform_get_drvdata(pdev); + struct hidma_dev *mdev = dev_get_drvdata(dev); buf[0] = 0; diff --git a/drivers/dma/qcom/hidma_mgmt_sys.c b/drivers/dma/qcom/hidma_mgmt_sys.c index d61f1068a34b..cbb89eafd844 100644 --- a/drivers/dma/qcom/hidma_mgmt_sys.c +++ b/drivers/dma/qcom/hidma_mgmt_sys.c @@ -107,8 +107,7 @@ static struct hidma_mgmt_fileinfo hidma_mgmt_files[] = { static ssize_t show_values(struct device *dev, struct device_attribute *attr, char *buf) { - struct platform_device *pdev = to_platform_device(dev); - struct hidma_mgmt_dev *mdev = platform_get_drvdata(pdev); + struct hidma_mgmt_dev *mdev = dev_get_drvdata(dev); unsigned int i; buf[0] = 0; @@ -125,8 +124,7 @@ static ssize_t show_values(struct device *dev, struct device_attribute *attr, static ssize_t set_values(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - struct platform_device *pdev = to_platform_device(dev); - struct hidma_mgmt_dev *mdev = platform_get_drvdata(pdev); + struct hidma_mgmt_dev *mdev = dev_get_drvdata(dev); unsigned long tmp; unsigned int i; int rc; -- 2.11.0