Skip to contentSkip to conversation

mtd: spi-nor: remove duplicated w25q128 entry

PATCH In review Rafał Miłecki 3 participants 5 messages Aug 7, 2014 – Aug 16, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mtd: spi-nor: remove duplicated w25q128 entry

---
This is based on top of
mtd: spi-nor: factor out write_enable() for erase commands

---
 drivers/mtd/spi-nor/spi-nor.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mtd/spi-nor/spi-nor.c +0 -1
index d08d9f8..06fe959 100644
@@ -613,7 +613,6 @@ const struct spi_device_id spi_nor_ids[] = {
 	{ "w25q32dw", INFO(0xef6016, 0, 64 * 1024,  64, SECT_4K) },
 	{ "w25x64", INFO(0xef3017, 0, 64 * 1024, 128, SECT_4K) },
 	{ "w25q64", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) },
-	{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
 	{ "w25q80", INFO(0xef5014, 0, 64 * 1024,  16, SECT_4K) },
 	{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024,  16, SECT_4K) },
 	{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
Signature · 1 line
1.8.4.5
#1 lore raw

PATCH 2/2 mtd: spi-nor: drop jedec_probe /helper/ function

It's a one-liner doing no magic and its name may be confusing because it does not have to use JEDEC (e.g. when using alternative read_id).

---
 drivers/mtd/spi-nor/spi-nor.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/mtd/spi-nor/spi-nor.c +1 -6
index 06fe959..ef45177 100644
@@ -660,11 +660,6 @@ static const struct spi_device_id *spi_nor_read_id(struct spi_nor *nor)
 	return ERR_PTR(-ENODEV);
 }
 
-static const struct spi_device_id *jedec_probe(struct spi_nor *nor)
-{
-	return nor->read_id(nor);
-}
-
 static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len,
 			size_t *retlen, u_char *buf)
 {
@@ -939,7 +934,7 @@ int spi_nor_scan(struct spi_nor *nor, const struct spi_device_id *id,
 	if (info->jedec_id) {
 		const struct spi_device_id *jid;
 
-		jid = jedec_probe(nor);
+		jid = nor->read_id(nor);
 		if (IS_ERR(jid)) {
 			return PTR_ERR(jid);
 		} else if (jid != id) {
Signature · 1 line
1.8.4.5
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] mtd: spi-nor: drop jedec_probe /helper/ function

Quoted 35 lines · Rafał Miłecki

It's a one-liner doing no magic and its name may be confusing because it does not have to use JEDEC (e.g. when using alternative read_id).

---
 drivers/mtd/spi-nor/spi-nor.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/mtd/spi-nor/spi-nor.c +1 -6
index 06fe959..ef45177 100644
@@ -660,11 +660,6 @@ static const struct spi_device_id *spi_nor_read_id(struct spi_nor *nor)
 	return ERR_PTR(-ENODEV);
 }
 
-static const struct spi_device_id *jedec_probe(struct spi_nor *nor)
-{
-	return nor->read_id(nor);
-}
-
 static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len,
 			size_t *retlen, u_char *buf)
 {
@@ -939,7 +934,7 @@ int spi_nor_scan(struct spi_nor *nor, const struct spi_device_id *id,
 	if (info->jedec_id) {
 		const struct spi_device_id *jid;
 
-		jid = jedec_probe(nor);
+		jid = nor->read_id(nor);
 		if (IS_ERR(jid)) {
 			return PTR_ERR(jid);
 		} else if (jid != id) {
Signature · 1 line
1.8.4.5
Acked-by on v1 1/2
#3 lore raw
In reply to Rafał Miłecki
Quoted 22 lines · Rafał Miłecki

---
This is based on top of
mtd: spi-nor: factor out write_enable() for erase commands

---
 drivers/mtd/spi-nor/spi-nor.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mtd/spi-nor/spi-nor.c +0 -1
index d08d9f8..06fe959 100644
@@ -613,7 +613,6 @@ const struct spi_device_id spi_nor_ids[] = {
 	{ "w25q32dw", INFO(0xef6016, 0, 64 * 1024,  64, SECT_4K) },
 	{ "w25x64", INFO(0xef3017, 0, 64 * 1024, 128, SECT_4K) },
 	{ "w25q64", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) },
-	{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
 	{ "w25q80", INFO(0xef5014, 0, 64 * 1024,  16, SECT_4K) },
 	{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024,  16, SECT_4K) },
 	{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
Signature · 1 line
1.8.4.5