[U-Boot] [PATCH v1 2/2] dm: sf: Update default name of spi flash in structure udevice

Simon Glass sjg at chromium.org
Fri May 1 03:54:44 CEST 2015


Hi,


On 29 April 2015 at 04:42, Haikun Wang <haikun.wang at freescale.com> wrote:
> Default name of spi flash like this "0:0", update it to "spi_flash at 0:0".
>
> Signed-off-by: Haikun Wang <haikun.wang at freescale.com>
> ---
>  drivers/mtd/spi/sf-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
> index 4b25902..e5612f7 100644
> --- a/drivers/mtd/spi/sf-uclass.c
> +++ b/drivers/mtd/spi/sf-uclass.c
> @@ -56,7 +56,7 @@ int spi_flash_probe_bus_cs(unsigned int busnum, unsigned int cs,
>         char name[20], *str;

Just to be safe, can you instead this to [30]?

>         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);
> --
> 2.1.0.27.g96db324
>

Regards,
Simon


More information about the U-Boot mailing list