From patchwork Fri Jun 22 16:06:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 139719 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1052716lji; Fri, 22 Jun 2018 09:08:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI0Jk/LCBnh/C851xrzoAybEAG1SwPbVyB2vjVj+5CfIx0hFni+3dDfDvjpWCIuRPQb5k8L X-Received: by 2002:a65:4985:: with SMTP id r5-v6mr1982598pgs.110.1529683701359; Fri, 22 Jun 2018 09:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529683701; cv=none; d=google.com; s=arc-20160816; b=mahYDzDmaJspkmVg/yJA9WAE8j5HkTF+OR1VW5CNLbSpXGrdMEm4oozKYSJeK7x7V9 IJ+KExmk1UpcUyrud74r59bqMDUZA8FTRcIvhx/6x3+tVeiBmv46qwlRvP065MPLycF0 bfEEYGfcZqZK3jvHpi75QgPZ8BW6eWOP0bEYqG61BdK1pacHUNLnPTKIwYUzO2j7vPAq Zi8JgJSWH5x/WDxyWbbWL0JXvjY5ceda2SQxocx+ymgnXFI/qfVTmv/+sAZbyq9O91wJ ynTSPBbMPPheUe7cvBJ1CrtmcKddl5x8pYuQU+yySbxvBiqDiGzlxZLhooVm5wF0eB9l Wnow== 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:dkim-signature:dkim-filter :arc-authentication-results; bh=v5vvfEGZMfiay+4sJMQnFpe/h/B2T8+PH26onq6v+BI=; b=lFYtFSVnzu0CDccawzmO3gT1CKzEex/wo/rE1eB2XPJmpWyBx2cFF1bwC36pEM40FX 80j5nrBxgwHpNrw1VSkioVPLYz4oUAgQcMb3UFTkjGUUWSw5ZM2QUnHP02XZzOoFQCox 4PARw57J//v2FRsx2YI1TeBKNsEUVzxVCB4sG3wA/wnHZqVGvbDgq4J4wFwYU8KDOXbV 5BmKnYSY5+i/4xGJ4/H+YDaQZdeAgSFp4vmHJIzvHyMIfoW2icA4aveWXUV5l5otA0Ed Z+TlHiuiakqOXtpo3n3iMKOPCB3zbGtphUEOFwmT971aG5gAzG/MirO20NYHfooT8jb8 9XSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=FYLHJJGM; 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 b16-v6si6412433pgv.358.2018.06.22.09.08.21; Fri, 22 Jun 2018 09:08: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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=FYLHJJGM; 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 S934140AbeFVQIT (ORCPT + 31 others); Fri, 22 Jun 2018 12:08:19 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:30586 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933391AbeFVQIP (ORCPT ); Fri, 22 Jun 2018 12:08:15 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-12.nifty.com with ESMTP id w5MG6m5c022587; Sat, 23 Jun 2018 01:06:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w5MG6m5c022587 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1529683611; bh=v5vvfEGZMfiay+4sJMQnFpe/h/B2T8+PH26onq6v+BI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FYLHJJGMwHUfApoJm0g3k4Lu0FtrEKepenhM9lf4Xj4Vg9fnChQwCb8pq5n16IQ+R 37E00XOd7Ol1YYzhdDSY40Ugjdesb1Tf+Ba0UezpQXoShOVKlbjvC/JTtmrJT0vXpi +4BRHtVVnewNhWNwO6tCuMfXfrzN0N/66Aebvrnpgxmc/d1uX5KYxkV2yshwX8ITO3 2K4XfLLUKnlh5PuQ/HqYTivBZuVfCHBheE2sagcRxQCKkpn9DO6wqNucx0rCxVA9JW iW+b58LgUwswfvM3eYoSesWjnBRbOyR0hCp/0O3iyJb9MbUDtfSu4+x77rIcXJEYe0 Btji844rZZk4A== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Boris Brezillon Cc: Rob Herring , Miquel Raynal , Richard Weinberger , Masahiro Yamada , linux-kernel@vger.kernel.org, Marek Vasut , Brian Norris , David Woodhouse Subject: [PATCH v4 2/5] mtd: rawnand: denali_dt: use dev as a shorthand of &pdev->dev Date: Sat, 23 Jun 2018 01:06:35 +0900 Message-Id: <1529683598-25783-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529683598-25783-1-git-send-email-yamada.masahiro@socionext.com> References: <1529683598-25783-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The probe function references &pdev->dev many times, and I will add more soon. Add 'dev' as a shorthand. Signed-off-by: Masahiro Yamada Acked-by: Miquel Raynal Reviewed-by: Richard Weinberger Tested-by: Richard Weinberger Reviewed-by: Boris Brezillon --- Changes in v4: None Changes in v3: None Changes in v2: None drivers/mtd/nand/raw/denali_dt.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) -- 2.7.4 diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index 5869e90..6b4bd16 100644 --- a/drivers/mtd/nand/raw/denali_dt.c +++ b/drivers/mtd/nand/raw/denali_dt.c @@ -79,44 +79,45 @@ MODULE_DEVICE_TABLE(of, denali_nand_dt_ids); static int denali_dt_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; struct resource *res; struct denali_dt *dt; const struct denali_dt_data *data; struct denali_nand_info *denali; int ret; - dt = devm_kzalloc(&pdev->dev, sizeof(*dt), GFP_KERNEL); + dt = devm_kzalloc(dev, sizeof(*dt), GFP_KERNEL); if (!dt) return -ENOMEM; denali = &dt->denali; - data = of_device_get_match_data(&pdev->dev); + data = of_device_get_match_data(dev); if (data) { denali->revision = data->revision; denali->caps = data->caps; denali->ecc_caps = data->ecc_caps; } - denali->dev = &pdev->dev; + denali->dev = dev; denali->irq = platform_get_irq(pdev, 0); if (denali->irq < 0) { - dev_err(&pdev->dev, "no irq defined\n"); + dev_err(dev, "no irq defined\n"); return denali->irq; } res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "denali_reg"); - denali->reg = devm_ioremap_resource(&pdev->dev, res); + denali->reg = devm_ioremap_resource(dev, res); if (IS_ERR(denali->reg)) return PTR_ERR(denali->reg); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_data"); - denali->host = devm_ioremap_resource(&pdev->dev, res); + denali->host = devm_ioremap_resource(dev, res); if (IS_ERR(denali->host)) return PTR_ERR(denali->host); - dt->clk = devm_clk_get(&pdev->dev, NULL); + dt->clk = devm_clk_get(dev, NULL); if (IS_ERR(dt->clk)) { - dev_err(&pdev->dev, "no clk available\n"); + dev_err(dev, "no clk available\n"); return PTR_ERR(dt->clk); } ret = clk_prepare_enable(dt->clk);