X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fmtd%2Fspi%2Fsandbox.c;h=895604d7367e13479787c7ecf96cbb8abeaaa88d;hb=4ca0c3c993436cca743ed521e7f3d784d7fe31c8;hp=106dda9ccc52b8850f84d0575b774537dab0c6e9;hpb=1603bf3cc189da65362b83b85831e094a2fe8516;p=u-boot diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c index 106dda9ccc..895604d736 100644 --- a/drivers/mtd/spi/sandbox.c +++ b/drivers/mtd/spi/sandbox.c @@ -129,7 +129,7 @@ static int sandbox_sf_probe(struct udevice *dev) } } if (cs == -1) { - printf("Error: Unknown chip select for device '%s'", + printf("Error: Unknown chip select for device '%s'\n", dev->name); return -EINVAL; } @@ -590,6 +590,11 @@ int sandbox_sf_bind_emul(struct sandbox_state *state, int busnum, int cs, void sandbox_sf_unbind_emul(struct sandbox_state *state, int busnum, int cs) { + struct udevice *dev; + + dev = state->spi[busnum][cs].emul; + device_remove(dev); + device_unbind(dev); state->spi[busnum][cs].emul = NULL; }