[U-Boot] [PATCH v3 04/11] mtd: sf: Make sure we don't register the same device twice

Heiko Schocher hs at denx.de
Wed Nov 21 06:45:05 UTC 2018


Hello Boris,

Am 19.11.2018 um 21:59 schrieb Boris Brezillon:
> spi_flash_mtd_register() can be called several times and each time it
> will register the same mtd_info instance like if it was a new one.
> The MTD ID allocation gets crazy when that happens, so let's track the
> status of the sf_mtd_info object to avoid that.
> 
> Fixes: 9fe6d8716e09 ("mtd, spi: Add MTD layer driver")
> Signed-off-by: Boris Brezillon <boris.brezillon at bootlin.com>
> ---
> Changes in v3:
> - None
> 
> Changes in v2
> - None
> ---
>   drivers/mtd/spi/sf_mtd.c | 13 ++++++++++++-
>   1 file changed, 12 insertions(+), 1 deletion(-)

Tested-by: Heiko Schocher <hs at denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the U-Boot mailing list