From ff56bba2d6952176a826bddcd9baf84f61b419a3 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 11 Nov 2014 10:46:22 -0700 Subject: dm: spi: Correct handling of SPI chip selects in sandbox This code was not updated when the chip select handling was adjusted. Fix it to call the correct function. Signed-off-by: Simon Glass Reviewed-by: Jagannadha Sutradharudu Teki Acked-by: Heiko Schocher --- drivers/mtd/spi/sandbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd') diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c index 1cf2f98..fecf6d4 100644 --- a/drivers/mtd/spi/sandbox.c +++ b/drivers/mtd/spi/sandbox.c @@ -602,7 +602,7 @@ static int sandbox_sf_bind_bus_cs(struct sandbox_state *state, int busnum, spec, ret); return ret; } - ret = device_find_child_by_seq(bus, cs, true, &slave); + ret = spi_find_chip_select(bus, cs, &slave); if (!ret) { printf("Chip select %d already exists for spec '%s'\n", cs, spec); -- cgit v1.1 From 6b18656aff0a1aec15528c47cc6108b44b559f7c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 11 Nov 2014 10:46:23 -0700 Subject: dm: spi: Use device_bind_driver() instead of our own function The SPI function does the same thing, so we may as well just use the new generic function. The 'cs' parameter was not actually used, so can be dropped. Signed-off-by: Simon Glass Reviewed-by: Jagannadha Sutradharudu Teki Acked-by: Heiko Schocher --- drivers/mtd/spi/sandbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd') diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c index fecf6d4..c6a5c4b 100644 --- a/drivers/mtd/spi/sandbox.c +++ b/drivers/mtd/spi/sandbox.c @@ -609,7 +609,7 @@ static int sandbox_sf_bind_bus_cs(struct sandbox_state *state, int busnum, return -EEXIST; } - ret = spi_bind_device(bus, cs, "spi_flash_std", spec, &slave); + ret = device_bind_driver(bus, "spi_flash_std", spec, &slave); if (ret) return ret; -- cgit v1.1