On 30 September 2014 04:15, Ben Hutchings <[email protected]> wrote: > @@ -236,16 +236,13 @@ 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); > + name = data->type; > > /* If we didn't get name from platform, simply use "modalias". */ > - if (!id) { > - id = spi_nor_match_id(spi_get_device_id(spi)->name); > - if (WARN_ON(!id)) > - return -ENODEV; > - } > + if (!name) > + name = spi_get_device_id(spi)->name;
Huh? Iterating the whole id_table, checking the entries (looking for one with name equal to the spi->modalias) and then... getting that name? Did it hurt to use the patch I've sent mtd: m25p80: get rid of spi_get_device_id https://patchwork.ozlabs.org/patch/394328/ -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/cacna6rynp7+4y7oss60atdzhuwfhiayv4oq5eli1gyen45z...@mail.gmail.com

