Received: by 10.192.165.148 with SMTP id m20csp2190225imm; Sun, 22 Apr 2018 02:17:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+xysUoPCpB4OJT05G2muhmNYVCDrMy+usgQQBH8XUOhxMqM1Ghy8y4iflHDwyVU7Repijy X-Received: by 10.99.157.12 with SMTP id i12mr13142434pgd.87.1524388641868; Sun, 22 Apr 2018 02:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524388641; cv=none; d=google.com; s=arc-20160816; b=VTciDEBt4jVfBtesp3ghPkjhteKXMwvL7wyR12NqH19MN7WkAunslWUPsgBhis/6DC vEn21tzbmwTkAaiTAIBdUFoIsN2/hGuaey6CqVYnXUm1FglBGthi1871jwDOxxUnpzIu jQAtOIRayNDHgmbi/3Vs+mbONbYFNpbO4XHzQ69G891/ALqxu6wg8bv1Zb3SENO+KgOw /fuUB5f/OL8QBR5atH0NWSbSy3Nf++7lfZOmmiDWO+VcWEJQVJ2lch1MxqWrH9YbtzpI 6t9RJawzMb34r7fprEXrqZ15fnddYf+G9z9yocYhsU05ATXTCgAyultuKEvbLvy9B8QB jLQQ== 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=2pVPzRxv7wB9eJPiaqTxGCigq+cIJQQW1lG74cm90eU=; b=gJhOGvbHnZ/6FiU2t57HFD8sAAbciufLOcLqPQ8Li+/ej3pu3oHFKWAv8EkKYTvmh5 ZPizW7df6oxX07o1rvHUvVgcLZn/3vCG0hL9JbivxcaZeQG9VkeXfKr4Usx0fihlWukY YXnDk0wNb75PRWhvgblwHIYcB6h3Ogt6w+0rIHZJceXtlnTz1zXTBtT27dViYSDTndLr vdDBwXp+k7NqIMKDXcia88Lmg0bXE4pFG8z7A90QsLr4MqbTq60x0XOZtDjlKFgpFr6d kGHIa1nmgWIMNep8DC0tEyE2kyo4KR62xGkRgvL+UfJIazLp3frWSv8uaEiLrK5wqwcW CUzA== 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 f2-v6si4800166pli.569.2018.04.22.02.17.07; Sun, 22 Apr 2018 02:17:21 -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 S1753470AbeDVJPc (ORCPT + 99 others); Sun, 22 Apr 2018 05:15:32 -0400 Received: from sauhun.de ([88.99.104.3]:37602 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751654AbeDVJOU (ORCPT ); Sun, 22 Apr 2018 05:14:20 -0400 Received: from localhost (p5486C379.dip0.t-ipconnect.de [84.134.195.121]) by pokefinder.org (Postfix) with ESMTPSA id 0AAEA3274FB; Sun, 22 Apr 2018 11:14:19 +0200 (CEST) From: Wolfram Sang To: dmaengine@vger.kernel.org Cc: Wolfram Sang , Vinod Koul , Dan Williams , linux-kernel@vger.kernel.org Subject: [PATCH 4/6] dmaengine: idma64: simplify getting .drvdata Date: Sun, 22 Apr 2018 11:14:12 +0200 Message-Id: <20180422091415.7587-5-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180422091415.7587-1-wsa+renesas@sang-engineering.com> References: <20180422091415.7587-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 to your tree directly. drivers/dma/idma64.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c index 1953e57505f4..e5c911200bdb 100644 --- a/drivers/dma/idma64.c +++ b/drivers/dma/idma64.c @@ -670,8 +670,7 @@ static int idma64_platform_remove(struct platform_device *pdev) static int idma64_pm_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct idma64_chip *chip = platform_get_drvdata(pdev); + struct idma64_chip *chip = dev_get_drvdata(dev); idma64_off(chip->idma64); return 0; @@ -679,8 +678,7 @@ static int idma64_pm_suspend(struct device *dev) static int idma64_pm_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct idma64_chip *chip = platform_get_drvdata(pdev); + struct idma64_chip *chip = dev_get_drvdata(dev); idma64_on(chip->idma64); return 0; -- 2.11.0