From patchwork Tue Jun 12 10:31:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 138303 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5170969lji; Tue, 12 Jun 2018 03:33:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ4gjLk3FHlQJRDEZo5kQx75r78LgzL40+axYSP483ei6ImVP5WnTCg1+rS/UUUtbp2cviO X-Received: by 2002:a17:902:5a87:: with SMTP id r7-v6mr3420769pli.78.1528799610552; Tue, 12 Jun 2018 03:33:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528799610; cv=none; d=google.com; s=arc-20160816; b=p5VlTW/9E+3XLAVqcZrtn1lFBDvGmTTDxgkDVP67TdnjWlCEto0sCSos7vjwDuUehj lffdhjMR0dySKZJB7p2KgR15K3rZzRlu9BaMoOs04ss6Wn5XycEjswqKdWzhCRyDv+Xf QIVx2m4yt56Q5ZBd48RnIFXa/SzUfwxS9Jj/f4hkYvki2ulqyFo1lShv+9tl6rnzUI/3 DCe60FY0LZMneRfT1moIO5k4apxLXIhfUKnfez89+qCl79he98R+3WiHLBZsLieEf40K /gq/OjsuvBksV2xMOcWI13MEB/Km3xjMP9INJ1x55JbZu64Bk2OfWUKH1RZrgtMdWZQZ 6Ezw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature :dkim-filter:dkim-signature:arc-authentication-results; bh=Be+MtxhymI9cib0fAZ80XcEQqmXV6ePLxJdPtATWhGQ=; b=pYsLeqbGLBWkuNVBsp4vXwYo6xNAeQNLbnTTjL3X02fSfOJxX39pHC5Wemeeq9Szqc 0k1u0ZuygJr0MCxwkKUJfIP+1csBYy9JHCAsv3aR7mKbylNGMIyS1MDHa4mNYDpqh7Bx FR4mIJmVNzcJMNRuoIYq3SIblYXIS/fol7mMwaN4drLvU9qCVFidp/cb3tOkDK51dvF0 KyoEGJShC0OyaUMllxlIYEl0Q+GFYzZpwVFWfyxO77zYy41nbL6at6XN+IhCdq60TSH0 azQPEDQpNB4pHu0ssHwmmJMm9slrlAF+WjTw7ELkCesh7QtpqV9FJ2dMA7UAkLcVKmNh Lifw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=dh+THUmX; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b="K/jV6Wk3"; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id q6-v6si501071pgs.451.2018.06.12.03.33.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Jun 2018 03:33:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=dh+THUmX; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b="K/jV6Wk3"; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=Be+MtxhymI9cib0fAZ80XcEQqmXV6ePLxJdPtATWhGQ=; b=dh+ THUmXoIWMNrtDE+8VPtuwaFjnwbIbUUk+/DRQSFUcdg4FN6/Gbp2NU+W7zmg2HDsWdpFvJDTlMTSs P7UkDG1l/hv9JGrzTn3AC5UYeGa2ZCBixnrd4rVURs9jKiiVt+GB2q0bvN4aGfLBsUdnS1pRnh7Vn QCftu2leJIwHMClRPKzcj00F0pvOTk6qruXTh+3+wm8bBStFFXQ8Cl3iCCerZA/z2V0hQ2qK87W6q MVCIV4nkRE+jgvK06PrcnzZg+For+sGVGlcpszK+D7mWtHfYhJFloXDRf2bTO4IJfOvj8YUpnp3nX Dkx0brLWEizaxKbq4MzkzO5dkNOPg5w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSgbu-0001wF-OV; Tue, 12 Jun 2018 10:33:10 +0000 Received: from conuserg-10.nifty.com ([210.131.2.77]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSgbq-0001t7-9P for linux-mtd@lists.infradead.org; Tue, 12 Jun 2018 10:33:08 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w5CAWQLv002200; Tue, 12 Jun 2018 19:32:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w5CAWQLv002200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1528799547; bh=xlmkvhS34IsF0Tfr28zTqZ9AIGpKQH78cmpXUmOKdkI=; h=From:To:Cc:Subject:Date:From; b=K/jV6Wk3ujLEU8nxf8u3SIcjXVWU7kPB+VqYiB73skYLM8Rlpolb18cbyLMtXo7OZ CWh6iTUseXm4TIOAWiYL5l5lV6XC6yzehgeN0EpejHP0FQEu4WXj9tHyg6m/tEBwHT A/G8c8vIqHnzo8Y19uVGCNtBU6flwVUiWFBJxD7r8Ua7qtzWpP0j3JQZtEOfsKhc3G nujqRRvvTwMP0sp2IJvNHATeGYmEGNpeeLJQX+RoHUPrRgdx9CTBV4LpOn1H0Jm7xE l7c4xKG/K21djMWIZ9HaoWbGMd2qvnlY4laEu84AXZzEEbgL4EeipZrkQDtU5mrdQ7 kIxkmLqy9FSTw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Boris Brezillon Subject: [PATCH 1/2] mtd: rawnand: denali_dt: use dev as a shorthand of &pdev->dev Date: Tue, 12 Jun 2018 19:31:54 +0900 Message-Id: <1528799515-1356-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180612_033306_700570_FB67FDA2 X-CRM114-Status: GOOD ( 10.56 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.77 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Brian Norris , Marek Vasut , Richard Weinberger , linux-kernel@vger.kernel.org, Masahiro Yamada , Miquel Raynal , Philipp Rosenberger , Richard Weinberger , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Add 'dev' as a shorthand before adding more code that takes a pointer to struce device. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/raw/denali_dt.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index cfd33e6..d923cfa 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);