Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp508267imm; Thu, 5 Jul 2018 04:19:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe26l7HwufF6n5cstf7CoVC/78DZdIYaSQkxPFsfPRiP9v45gtRc2NahK3aAnR2jbeHr1zx X-Received: by 2002:a62:3c4f:: with SMTP id j76-v6mr6008268pfa.119.1530789575704; Thu, 05 Jul 2018 04:19:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530789575; cv=none; d=google.com; s=arc-20160816; b=KWftHZeL5pVBncaewzA9boa8GXaHXohK3vb6MZloOcv5Cr2s6nPMHQJrK7owtiVcG6 2bwkwQRO9PnqOxlTUHA0GR2EaLKMSkFgCoxE7FB/TzZDgPNoBQEsqiMwCNl8DOel84Cv zfa1hhNaR0pedxDayOyudgezuVVGAtqTyTZJdFcK6QFGYAUf3v0hstnCgTdXPUktiOxc KpsVklNgeq2kbFhTdbR8xTwHePc9ZjnSalXPBsMuQrIWwIfIExbjDV1Gs8wD4iuUDe55 nX/5ReuTB9CsLCQBckcHuB6ewfncF+UsMSI4Dn0TlaFsfO6Njt6RTpIsiTa1P9kkCbsO EodQ== 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:arc-authentication-results; bh=aqTVBgAUlRCK+LAYDu6utyBdk4sV1FurHkv030PioW4=; b=pzUQ/sv8Wd7shNTerH4dBFxznHE1aQURvspdZMO6jLWrBimsSYfuyssvcspCuiGDmj 8dWJd/9GnJG0sQY9LbN2qlfrDCIxeFNIFIT2IxDarMyuBy+f25zvp4RMSQ0MbS+z09ca WRt4lGpmDpC6aL65BToIoTiDYCHEL2zYPuvGCSX1K8/VlAByYoICr5btgLtO37AoyECi 89AnwAPXur7uYrwdYtbWZLb2Eo4OuSCvBkac17r5LEwnxZ4S1KV/PxN3bmV7M6S7SX5F a3hQ4GKkBQbw7s0yfnIb2YCgNTdJPEmvvF6rIjkd/edu34/IK/eapR9N/qi96hvOrRZm PcYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@as-electronics.de header.s=strato-dkim-0002 header.b=rYvw9Glu; 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 u184-v6si5561020pgd.193.2018.07.05.04.19.21; Thu, 05 Jul 2018 04:19:35 -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=fail header.i=@as-electronics.de header.s=strato-dkim-0002 header.b=rYvw9Glu; 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 S1753980AbeGELSB (ORCPT + 99 others); Thu, 5 Jul 2018 07:18:01 -0400 Received: from mo4-p05-ob.smtp.rzone.de ([81.169.146.181]:15227 "EHLO mo4-p05-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753894AbeGELR7 (ORCPT ); Thu, 5 Jul 2018 07:17:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1530789477; s=strato-dkim-0002; d=as-electronics.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=aqTVBgAUlRCK+LAYDu6utyBdk4sV1FurHkv030PioW4=; b=rYvw9GluoqePq5PBMiLRIITODlNBN8RUM2Lk8PHtzjA8mmSSvUSGItp/Cbg8nVBmDi yggnJnzWzPkad4RkLp6hl9ZrdNfwab3y/KLbJW5nGd1MOkuZfP8diJOt+auB3sTxeUoC nvzcVcVoU2zJlII/xbgOrHnwrf+iFTyDB66dVbWxVei+cze7CRPxHZpOreuLs7s8wnzy IXiTSU5xHdDF6ZwSKyBb1IrJUF8NV3T1dv9ZBwX3QTJeDZ4gFXZiPu0L5rLOdTVut1xW 36gLD2BzBt2GAiQT3x0Ell5Y/Dknr2YVQfyWu/ZzgA5vX7T6LPPXAGT9ZHATzWGsqagB vTSA== X-RZG-AUTH: ":LX8JdEmkW/4tAFwMkcNJIloh1hrA5u3owhPk7bdT5Fx22AatU+eLaHfutoZdl+X9BETxn4/4+IVqx+daE87UU5bgm7XHzClQnm8VxHglxo5wj3H1fls=" X-RZG-CLASS-ID: mo05 Received: from fs-work.fritz.box by smtp.strato.de (RZmta 43.12 AUTH) with ESMTPSA id a0925bu65BHK4i5 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 5 Jul 2018 13:17:20 +0200 (CEST) From: Frieder Schrempf To: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com, linux-spi@vger.kernel.org Cc: dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, richard@nod.at, miquel.raynal@bootlin.com, broonie@kernel.org, david.wolfe@nxp.com, fabio.estevam@nxp.com, prabhakar.kushwaha@nxp.com, yogeshnarayan.gaur@nxp.com, han.xu@nxp.com, shawnguo@kernel.org, Frieder Schrempf , Cyrille Pitchen , Hou Zhiqiang , Philipp Puschmann , linux-kernel@vger.kernel.org Subject: [PATCH v2 02/12] mtd: m25p80: Call spi_mem_get_name() to let controller set a custom name Date: Thu, 5 Jul 2018 13:14:58 +0200 Message-Id: <1530789310-16254-3-git-send-email-frieder.schrempf@exceet.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530789310-16254-1-git-send-email-frieder.schrempf@exceet.de> References: <1530789310-16254-1-git-send-email-frieder.schrempf@exceet.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org By calling spi_mem_get_name(), the driver of the (Q)SPI controller can set a custom name for the memory device if necessary. This is useful to keep mtdparts compatible when controller drivers are ported from the MTD to the SPI layer. Signed-off-by: Frieder Schrempf --- drivers/mtd/devices/m25p80.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index e84563d..482f0ef 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -199,8 +199,7 @@ static int m25p_probe(struct spi_mem *spimem) hwcaps.mask |= SNOR_HWCAPS_READ_1_2_2; } - if (data && data->name) - nor->mtd.name = data->name; + nor->mtd.name = spi_mem_get_name(spimem); /* For some (historical?) reason many platforms provide two different * names in flash_platform_data: "name" and "type". Quite often name is -- 2.7.4