Home
last modified time | relevance | path

Searched hist:c79c393fb9344b7e8c2200ec0933a0513cf8526d (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/drivers/mtd/spi/
H A Dsf_mtd.cc79c393fb9344b7e8c2200ec0933a0513cf8526d Sun Dec 02 09:54:25 UTC 2018 Boris Brezillon <boris.brezillon@bootlin.com> UPSTREAM: mtd: sf: Make sure we don't register the same device twice

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")
Change-Id: Ia2c2778f275d0bf46371b5f914fcf1d1bbefdede
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 492151b2093ee4df173f7e10da4938ef7c2a2156)