mtd: spi-nor: remove duplicated w25q128 entry
Subsystems (2)
PATCH 2/2 mtd: spi-nor: drop jedec_probe /helper/ function
In reply to Rafał MiłeckiIt'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).
Signed-off-by Rafał Miłecki <[email protected]>
--- drivers/mtd/spi-nor/spi-nor.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/mtd/spi-nor/spi-nor.c +1 -6
@@ -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
PATCH 1/2 mtd: spi-nor: remove duplicated w25q128 entry
Signed-off-by Rafał Miłecki <[email protected]>
---
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
@@ -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
Quoted 22 lines · Rafał Miłecki
Signed-off-by Rafał Miłecki <[email protected]>---
This is based on top of
mtd: spi-nor: factor outwrite_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@@ -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
Acked-by Huang Shijie <[email protected]>
Re: [PATCH 2/2] mtd: spi-nor: drop jedec_probe /helper/ function
In reply to Rafał MiłeckiQuoted 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).Signed-off-by Rafał Miłecki <[email protected]>--- drivers/mtd/spi-nor/spi-nor.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)drivers/mtd/spi-nor/spi-nor.c +1
-6@@ -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 Huang Shijie <[email protected]>
Quoted 3 lines · Huang Shijie
Quoted 1 line · Rafał Miłecki
Signed-off-by Rafał Miłecki <[email protected]>Acked-by Huang Shijie <[email protected]>
Pushed both to l2-mtd.git/next.
Brian