Message ID | 1411984074-3850-1-git-send-email-zajec5@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Sep 29, 2014 at 11:47:53AM +0200, Rafa? Mi?ecki wrote: > This simplifies the way we use spi_nor framework and will allow us to > drop spi_nor_match_id. Please don't CC linux-spi on spi-nor patches that don't have SPI level changes, it just clogs up patchwork.
On Wed, Oct 01, 2014 at 07:20:03PM +0100, Mark Brown wrote: > On Mon, Sep 29, 2014 at 11:47:53AM +0200, Rafa? Mi?ecki wrote: > > This simplifies the way we use spi_nor framework and will allow us to > > drop spi_nor_match_id. > > Please don't CC linux-spi on spi-nor patches that don't have SPI level > changes, it just clogs up patchwork. +1 from me. I appreciate the converse, as I don't need unrelated noise on linux-mtd. (I feel sorry for people over at linux-arm-kernel and devicetree, since they get CC'd on a large variety of unrelated things, it seems. I'm sure the firehose gets to be almost as bad as LKML sometimes.) Brian -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 1 October 2014 20:43, Brian Norris <computersforpeace@gmail.com> wrote: > On Wed, Oct 01, 2014 at 07:20:03PM +0100, Mark Brown wrote: >> On Mon, Sep 29, 2014 at 11:47:53AM +0200, Rafa? Mi?ecki wrote: >> > This simplifies the way we use spi_nor framework and will allow us to >> > drop spi_nor_match_id. >> >> Please don't CC linux-spi on spi-nor patches that don't have SPI level >> changes, it just clogs up patchwork. > > +1 from me. I appreciate the converse, as I don't need unrelated noise > on linux-mtd. > > (I feel sorry for people over at linux-arm-kernel and devicetree, since > they get CC'd on a large variety of unrelated things, it seems. I'm sure > the firehose gets to be almost as bad as LKML sometimes.) Sorry, I usually don't. AFAIR this time I copied receivers list from the original Ben patch / discussion about auto loading.
On Mon, Sep 29, 2014 at 11:47:53AM +0200, Rafa? Mi?ecki wrote: > This simplifies the way we use spi_nor framework and will allow us to > drop spi_nor_match_id. > > Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com> Applied to l2-mtd.git/master. Brian -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index dcda628..822209d 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -197,6 +197,7 @@ static int m25p_probe(struct spi_device *spi) struct m25p *flash; struct spi_nor *nor; enum read_mode mode = SPI_NOR_NORMAL; + char *flash_name = NULL; int ret; data = dev_get_platdata(&spi->dev); @@ -236,12 +237,11 @@ 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); - - /* If we didn't get name from platform, simply use "modalias". */ - if (!id) - id = spi_get_device_id(spi); + flash_name = data->type; + else + flash_name = spi->modalias; + id = spi_nor_match_id(flash_name); ret = spi_nor_scan(nor, id, mode); if (ret) return ret;
This simplifies the way we use spi_nor framework and will allow us to drop spi_nor_match_id. Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com> --- drivers/mtd/devices/m25p80.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)