[PATCH 3/3] [RFC] mtd: m25p80: Make fast read configurable via DT

Stefan Roese sr at denx.de
Fri Jul 6 02:43:44 EDT 2012


Hi Marek,

On Friday 06 July 2012 08:10:27 Marek Vasut wrote:
> @@ -914,6 +912,14 @@ static int __devinit m25p_probe(struct spi_device
> *spi) flash->page_size = info->page_size;
>  	flash->mtd.writebufsize = flash->page_size;
> 
> +	flash->fast_read = false;
> +	if (np && of_find_property(np, "m25p,fast-read", NULL))
> +		flash->fast_read = true;
> +
> +#ifdef CONFIG_M25PXX_USE_FAST_READ
> +	flash->fast_read = true;
> +#endif
> +

Better use of_property_read_bool() instead of of_find_property() here.

Thanks,
Stefan



More information about the linux-mtd mailing list