Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1500399imm; Wed, 13 Jun 2018 22:14:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJtDeth32PENPxjROQggF5m5S6+t29zwRuHDfvZ2+U1elALDVXqtsv1rLHJEcDIZV9NBP5N X-Received: by 2002:a17:902:8341:: with SMTP id z1-v6mr1324545pln.40.1528953288941; Wed, 13 Jun 2018 22:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528953288; cv=none; d=google.com; s=arc-20160816; b=JvMfYZTrn7KwDJuYgnGwD4OjR2HOiYgSZDuhFIyd3/QOSEte8vSe2xL50F4RujiWFa meLeX7Ifh7sHNNVXo+NUh9NvDhQarF9SvRGkdoBzhj3DAj9MRr69uOa/2ZeoMIMnF51Q FAAo8VvzC55f4imgsdop2oboM0aBky3QRIdkkHlH6uMW6HUYRkCkHln1bw5Xs9KZCsvC l47wbFIsrO3bAJYgfIcPz2m6i/9PDl9Fy/xBrKCuZLEwUmB+XzA8itxWfsDUJuqr5GrG Xn9TT1ABDxTKl2oEDaCXIweAmWs6TAA/Glly1na1G4UumkLKb4HxnVBcK3FakSJfPRLh QrUA== 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=6zjCqH2/niUWhUqhnX5ee0MSTNWgyn0kUe8iu0jnQPU=; b=m4eZNrSmCOGehWKMJux5ECJXSRshLQ0B4GqUJIJPonUeAziNrlHWzqESoLPwIBtY0U OrDdkrQ2lI+CceuXmyQgiiRvXWj20V+f5OcsLhGCwHV47eDbRctU8rrrzav20q89Kx3n qUFCMrlIV3Svb0TlXV3kY62YX9hgpZewWIELEf1q2r00l+A51aii83LBFU4UjFECGhm4 J73XSwkft8THV+23JDcLyOMvKEl8LQ/8heRVqahdHKJmmOveaDXTeSavImt18BVJmKWn e4Fd9UYM1ydDgj9y0mCiGtCtVfeS3JgMea74t20d2f6DB6f8ymf9GqZ2xKvkDYnGzHNn ZtTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=z6BgS8OH; 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 u13-v6si5506337plm.99.2018.06.13.22.14.35; Wed, 13 Jun 2018 22:14:48 -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=z6BgS8OH; 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 S1752767AbeFNFNN (ORCPT + 99 others); Thu, 14 Jun 2018 01:13:13 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:64794 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752681AbeFNFNL (ORCPT ); Thu, 14 Jun 2018 01:13:11 -0400 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 w5E5BB4c003441; Thu, 14 Jun 2018 14:11:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w5E5BB4c003441 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1528953074; bh=6zjCqH2/niUWhUqhnX5ee0MSTNWgyn0kUe8iu0jnQPU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z6BgS8OH5DSrPToX1BHq86OzxFhnw8BCXYFuWu7qpMybpEeAP5SYL90V2lvtwn4Jk 5ALyM1rLp4zOqq6Zt3mHpeCuGAXH5CiXSE2mytStgnKBU6652Ts/ev/D3KkAdXnLyN t0ElTicMtjKvgkitY+55Om4GVBq/yoGG/ywjoPwvKChtb68aC5M6mVfCPY4htGJdTL /wMJTM2cuA3PYOmpG5MFc5FTTk8X88d/RYJjRvbZ6/osm9N5R0kEAELVRpLAHcOhWm E1ymWihDDEVaWiPQcIMWN2xTASHBhCMo89VMxsY8I/fZiFL++Ot+2IMbEimvxs38Zm hUFTkADyfDduQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Boris Brezillon Cc: Richard Weinberger , Philipp Rosenberger , Rob Herring , Masahiro Yamada , Miquel Raynal , linux-kernel@vger.kernel.org, Marek Vasut , Brian Norris , Richard Weinberger , David Woodhouse Subject: [PATCH v2 1/3] mtd: rawnand: denali_dt: use dev as a shorthand of &pdev->dev Date: Thu, 14 Jun 2018 14:11:05 +0900 Message-Id: <1528953067-24324-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528953067-24324-1-git-send-email-yamada.masahiro@socionext.com> References: <1528953067-24324-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 Add 'dev' as a shorthand before adding more code that takes a pointer to struce device. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/raw/denali_dt.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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); -- 2.7.4