On Tue, 2014-09-30 at 07:14 +0200, Rafał Miłecki wrote: > On 30 September 2014 04:15, Ben Hutchings <ben@decadent.org.uk> 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? Ah, I didn't realise what spi_get_device_id() was doing. > 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/ It would make sense to insert that before this. Ben. -- Ben Hutchings The two most common things in the universe are hydrogen and stupidity.
Attachment:
signature.asc
Description: This is a digitally signed message part