[3.16.y-ckt extended stable] Patch "mtd: m25p80: get rid of spi_get_device_id" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Mon Nov 10 11:32:49 UTC 2014
This is a note to let you know that I have just added a patch titled
mtd: m25p80: get rid of spi_get_device_id
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt1.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 12286e2e2d1f432b5dc7d1f5873a47b40dec65e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5 at gmail.com>
Date: Mon, 29 Sep 2014 11:47:53 +0200
Subject: mtd: m25p80: get rid of spi_get_device_id
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 90e55b3812a1245bb674afcc4410ddba7db402f6 upstream.
This simplifies the way we use spi_nor framework and will allow us to
drop spi_nor_match_id.
Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/mtd/devices/m25p80.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index dcda6287228d..822209d10689 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -197,6 +197,7 @@ static int m25p_probe(struct spi_device *spi)
struct m25p *flash;
struct spi_nor *nor;
enum read_mode mode = SPI_NOR_NORMAL;
+ char *flash_name = NULL;
int ret;
data = dev_get_platdata(&spi->dev);
@@ -236,12 +237,11 @@ static int m25p_probe(struct spi_device *spi)
* If that's the case, respect "type" and ignore a "name".
*/
if (data && data->type)
- id = spi_nor_match_id(data->type);
-
- /* If we didn't get name from platform, simply use "modalias". */
- if (!id)
- id = spi_get_device_id(spi);
+ flash_name = data->type;
+ else
+ flash_name = spi->modalias;
+ id = spi_nor_match_id(flash_name);
ret = spi_nor_scan(nor, id, mode);
if (ret)
return ret;
--
2.1.0
More information about the kernel-team
mailing list