Message ID | 1430879863-32695-1-git-send-email-haikun.wang@freescale.com |
---|---|
State | Accepted |
Delegated to: | Simon Glass |
Headers | show |
On 5 May 2015 at 20:37, Haikun Wang <haikun.wang@freescale.com> wrote: > 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> > --- > > Changes in v2: > - Increase the size of array "name" to 30 > > Changes in v1: None > drivers/mtd/spi/sf-uclass.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Acked-by: Simon Glass <sjg@chromium.org>
On 5 May 2015 at 21:07, Simon Glass <sjg@chromium.org> wrote: > On 5 May 2015 at 20:37, Haikun Wang <haikun.wang@freescale.com> wrote: >> 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> >> --- >> >> Changes in v2: >> - Increase the size of array "name" to 30 >> >> Changes in v1: None >> drivers/mtd/spi/sf-uclass.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) > > Acked-by: Simon Glass <sjg@chromium.org> Applied to u-boot-dm, thanks!
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);
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> --- Changes in v2: - Increase the size of array "name" to 30 Changes in v1: None drivers/mtd/spi/sf-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)