linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Frieder Schrempf <frieder.schrempf@exceet.de>
Cc: Boris Brezillon <boris.brezillon@bootlin.com>,
	Mark Brown <broonie@kernel.org>,
	dwmw2@infradead.org, computersforpeace@gmail.com,
	boris.brezillon@bootlin.com, marek.vasut@gmail.com,
	richard@nod.at, broonie@kernel.org,
	linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org,
	cyrille.pitchen@wedev4u.fr, frieder.schrempf@exceet.de,
	pp@emlix.com, Zhiqiang.Hou@nxp.com, linux-kernel@vger.kernel.org,
	linux-spi@vger.kernel.org
Subject: Applied "mtd: m25p80: Call spi_mem_get_name() to let controller set a custom name" to the spi tree
Date: Thu,  2 Aug 2018 15:58:19 +0100 (BST)	[thread overview]
Message-ID: <20180802145820.032B11121BE5@debutante.sirena.org.uk> (raw)
In-Reply-To: <1533214434-28761-4-git-send-email-frieder.schrempf@exceet.de>

The patch

   mtd: m25p80: Call spi_mem_get_name() to let controller set a custom name

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From b02b17f55b2e789b9747cf4dd2eaaa110439a4cc Mon Sep 17 00:00:00 2001
From: Frieder Schrempf <frieder.schrempf@exceet.de>
Date: Thu, 2 Aug 2018 14:53:54 +0200
Subject: [PATCH] mtd: m25p80: Call spi_mem_get_name() to let controller set a
 custom name

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.

Suggested-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de>
Acked-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/mtd/devices/m25p80.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index e84563d2067f..aac488008216 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -202,6 +202,9 @@ static int m25p_probe(struct spi_mem *spimem)
 	if (data && data->name)
 		nor->mtd.name = data->name;
 
+	if (!nor->mtd.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
 	 * set to "m25p80" and then "type" provides a real chip name.
-- 
2.18.0


      parent reply	other threads:[~2018-08-02 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02 12:53 [PATCH v3 0/3] Extend the SPI mem interface to set a custom memory name Frieder Schrempf
2018-08-02 12:53 ` [PATCH v3 1/3] spi: spi-mem: Fix a typo in the documentation of struct spi_mem Frieder Schrempf
2018-08-02 13:09   ` Boris Brezillon
2018-08-02 13:39     ` Frieder Schrempf
2018-08-02 14:35       ` Mark Brown
2018-08-02 14:58   ` Applied "spi: spi-mem: Fix a typo in the documentation of struct spi_mem" to the spi tree Mark Brown
2018-08-02 12:53 ` [PATCH v3 2/3] spi: spi-mem: Extend the SPI mem interface to set a custom memory name Frieder Schrempf
2018-08-02 13:12   ` Boris Brezillon
2018-08-02 12:53 ` [PATCH v3 3/3] mtd: m25p80: Call spi_mem_get_name() to let controller set a custom name Frieder Schrempf
2018-08-02 13:14   ` Boris Brezillon
2018-08-02 14:58   ` Mark Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180802145820.032B11121BE5@debutante.sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Zhiqiang.Hou@nxp.com \
    --cc=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dwmw2@infradead.org \
    --cc=frieder.schrempf@exceet.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=pp@emlix.com \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).