[PATCH 2/2] MTD: m25p80: fix inconsistency in m25p_ids compared to spi_nor_ids

Brian Norris computersforpeace at gmail.com
Tue Nov 25 23:10:42 PST 2014


On Mon, Nov 10, 2014 at 04:54:54PM +0100, alison_chaiken at mentor.com wrote:
> From: Alison Chaiken <alison_chaiken at mentor.com>
> 
> As stated in a5b7616c5, "mtd: m25p80,spi-nor: Fix module aliases for
> m25p80", m25p_ids[] in m25p80.c needs to be kept in sync with
> spi_nor_ids[] in spi-nor.c.   The change here corrects a misalignment.
> 
> Rebased on linux-next.  Replaces an earlier version with a more terse
> commit message.

You don't need to put the last two sentences into the commit message.

But given the wrapping of this table, it probably helps to clarify
*what* the misalignment was in the commit message. So you're adding
the missing "m25px80" and removing a duplicate "w25q128"?

Also, I don't think we should be extending the table in m25p80 much
more. We should be adding support for a more generic device
compatibility name (like 'spi-nor,jedec-rdid'), and only allowing
probing/binding against generic terms. So then, we won't need to keep
messing with two copies of this table, for no real benefit.

> Signed-off-by: Alison Chaiken <alison_chaiken at mentor.com>
> 
> ---
>  drivers/mtd/devices/m25p80.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index 2783e94..f5cb8d5 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -291,11 +291,11 @@ static const struct spi_device_id m25p_ids[] = {
>  	{"m45pe10"},	{"m45pe80"},	{"m45pe16"},
>  	{"m25pe20"},	{"m25pe80"},	{"m25pe16"},
>  	{"m25px16"},	{"m25px32"},	{"m25px32-s0"},	{"m25px32-s1"},
> -	{"m25px64"},
> +	{"m25px64"},	{"m25px80"},
>  	{"w25x10"},	{"w25x20"},	{"w25x40"},	{"w25x80"},
>  	{"w25x16"},	{"w25x32"},	{"w25q32"},	{"w25q32dw"},
> -	{"w25x64"},	{"w25q64"},	{"w25q128"},	{"w25q80"},
> -	{"w25q80bl"},	{"w25q128"},	{"w25q256"},	{"cat25c11"},
> +	{"w25x64"},	{"w25q64"},	{"w25q80"},	{"w25q80bl"},
> +	{"w25q128"},	{"w25q256"},	{"cat25c11"},
>  	{"cat25c03"},	{"cat25c09"},	{"cat25c17"},	{"cat25128"},
>  	{ },
>  };

Anyway, I fixed the description and applied this to l2-mtd.git.

Brian



More information about the linux-mtd mailing list