summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHaikun.Wang@freescale.com <Haikun.Wang@freescale.com>2015-05-06 10:37:43 +0800
committerSimon Glass <sjg@chromium.org>2015-05-06 14:00:35 -0600
commita5e1bcdeebebabdc5d013fbd488f87a4e62ff411 (patch)
treeac0f5566b2bd77031c7848bc4adb8cc2750a3776 /drivers
parentf56da290b8df14a058b43735494dbbb0f8521a89 (diff)
downloadu-boot-imx-a5e1bcdeebebabdc5d013fbd488f87a4e62ff411.zip
u-boot-imx-a5e1bcdeebebabdc5d013fbd488f87a4e62ff411.tar.gz
u-boot-imx-a5e1bcdeebebabdc5d013fbd488f87a4e62ff411.tar.bz2
dm: sf: Update default name of spi flash in structure udevice
Default name of spi flash like this "0:0", update it to "spi_flash@0:0". Signed-off-by: Haikun Wang <haikun.wang@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/spi/sf-uclass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index 4b25902..350e21a 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -53,10 +53,10 @@ int spi_flash_probe_bus_cs(unsigned int busnum, unsigned int cs,
{
struct spi_slave *slave;
struct udevice *bus;
- char name[20], *str;
+ char name[30], *str;
int ret;
- snprintf(name, sizeof(name), "%d:%d", busnum, cs);
+ snprintf(name, sizeof(name), "spi_flash@%d:%d", busnum, cs);
str = strdup(name);
ret = spi_get_bus_and_cs(busnum, cs, max_hz, spi_mode,
"spi_flash_std", str, &bus, &slave);