[PATCH] mtd: spi-nor: spansion: Add support for S28HS256T
Jon Hunter
jonathanh at nvidia.com
Fri Sep 6 10:23:00 PDT 2024
Hi Michael,
On 06/09/2024 14:04, Michael Walle wrote:
> Hi Jon,
>
>> Bisect is pointing to this commit and adding the 'name' field does fix
>> it. So it would appear the SPI NOR code still wants the name field.
>
> Thanks for the report, could you try the following patch.
>
> -michael
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index d8e551fd2e2a..101ee5b0ddeb 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -3281,7 +3281,8 @@ static const struct flash_info *spi_nor_match_name(struct spi_nor *nor,
>
> for (i = 0; i < ARRAY_SIZE(manufacturers); i++) {
> for (j = 0; j < manufacturers[i]->nparts; j++) {
> - if (!strcmp(name, manufacturers[i]->parts[j].name)) {
> + if (manufacturers[i]->parts[j].name &&
> + !strcmp(name, manufacturers[i]->parts[j].name)) {
> nor->manufacturer = manufacturers[i];
> return &manufacturers[i]->parts[j];
> }
Works for me! If you plan to send a patch feel free to add my ...
Tested-by: Jon Hunter <jonathanh at nvidia.com>
Thanks
Jon
--
nvpublic
More information about the linux-mtd
mailing list