From patchwork Thu Mar 30 06:45:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 96227 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp102151qgd; Wed, 29 Mar 2017 23:48:47 -0700 (PDT) X-Received: by 10.98.8.206 with SMTP id 75mr4313215pfi.198.1490856527351; Wed, 29 Mar 2017 23:48:47 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id p10si1233923pge.292.2017.03.29.23.48.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 23:48:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.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:References: In-Reply-To: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:List-Owner; bh=8+sNgQQVpk6eBUvoPK53jN2AJQQsolA0jfg+Q/YDljs=; b=GnOYthimyw3mGaxl2QiU5WsUOC UUQeoMm5Nn0iOsOoxdgnhY00IOScZetKGoWzbwfbR8JlMO6rEMScNqTstythcwZlX+SB0pSatpNNq UVzq9sU9datXTZgy9QhzsoU0fFwqZpG3e2MQmk5dcseJA94tX5/iuVuqpD6037vO2Vh0W1mVCanAp jBMlREkmxNM3St1Fm8vGIdDnI5iAJ16PyRab0gkli/Djn0Fs7fMHUgZLgg7y6wI4WlycXm+G3x6zB 2Jy2aLt6Ujh3f8dC/rKoEr6HsmjzvsRTiAO1fxCY5OzPF0M6cZXAoNDEzyDV8qbAYhWcBt9ADAJtz rNqrDiSA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ctTsy-0008Me-N2; Thu, 30 Mar 2017 06:48:44 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ctTs2-0007De-Gz for linux-mtd@lists.infradead.org; Thu, 30 Mar 2017 06:47:53 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id v2U6kUcQ015463; Thu, 30 Mar 2017 15:46:33 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v2U6kUcQ015463 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1490856394; bh=7dIw6xy8BuDYNIlaqkras3UhqcUU8+iOp7vOjiCVY/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f+pAw8iRj5DTHhLH6nrRuQ93p+6E9hUIVxkXauMa055gdNSd3tnaaWSbVlOvG91qh BnzBPTJG+oCm5xMzXcoChgefI4HMRV09g6/EPJcfEsYp/auD3TwS95xFANF/JmW9ta kJMa+aw42+1nOtaXvqHqbeeNXhG0g8+JTnj402uZ5yVRQrxLgxL+FOf63g2BxDF0tP 7yp/yHbel5E5261/hR8jLOtCGBnWtxe4ld75fDcU2/u/wDozCSGdCelpMBa15fYxfo 2W4grKkuBMrnIZsffSw+ZF5XO9ClUwqaeHUKqCWwWi9/AoRzXvZPLU/k8wPItbjzkN 5w6hFj22ZXkRQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org Subject: [PATCH v3 02/37] mtd: nand: denali: allow to override mtd->name from label DT property Date: Thu, 30 Mar 2017 15:45:48 +0900 Message-Id: <1490856383-31560-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490856383-31560-1-git-send-email-yamada.masahiro@socionext.com> References: <1490856383-31560-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170329_234746_989227_F261CBA7 X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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: Boris Brezillon , Richard Weinberger , Dinh Nguyen , Masahiro Yamada , Artem Bityutskiy , Cyrille Pitchen , linux-kernel@vger.kernel.org, Marek Vasut , Masami Hiramatsu , Chuanxiao Dong , Jassi Brar , Brian Norris , Enrico Jorns , David Woodhouse , Graham Moore MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Commit 28309572aac4 ("mtd: name the mtd device with an optional label property") allow us to identify a chip in a user-friendly way. If nand_set_flash_node() picks up the "label" from DT, let's respect it. Otherwise, let it fallback to the current name "denali-nand". Signed-off-by: Masahiro Yamada Suggested-by: Boris Brezillon --- Changes in v3: - Replaced "mtd: nand: denali: do not set mtd->name" in v2 Changes in v2: None drivers/mtd/nand/denali.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 4ca75d3..4e6d03d 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -1462,8 +1462,10 @@ int denali_init(struct denali_nand_info *denali) /* now that our ISR is registered, we can enable interrupts */ denali_set_intr_modes(denali, true); - mtd->name = "denali-nand"; nand_set_flash_node(chip, denali->dev->of_node); + /* Fallback to the default name if DT did not give "label" property */ + if (!mtd->name) + mtd->name = "denali-nand"; /* register the driver with the NAND core subsystem */ chip->select_chip = denali_select_chip;