On Thu, 16 Aug 2018 17:30:29 +0200
Miquel Raynal <[email protected]> wrote:

>  
>  int ubi_part(char *part_name, const char *vid_header_offset)
>  {
> +     struct mtd_info *mtd;
>       int err = 0;
> -     char mtd_dev[16];
> -     struct mtd_device *dev;
> -     struct part_info *part;
> -     u8 pnum;
>  
>       ubi_detach();
> -     /*
> -      * Search the mtd device number where this partition
> -      * is located
> -      */
> -     if (find_dev_and_part(part_name, &dev, &pnum, &part)) {
> +
> +     mtd_probe_devices();

This function is only available if CONFIG_CMD_MTD=y, and you didn't
add the dependency on CMD_MTD. Anyway, as said earlier, I think this
function should be moved out of cmd/mtd.c.

> +     mtd = get_mtd_device_nm(part_name);
> +     if (IS_ERR(mtd)) {
>               printf("Partition %s not found!\n", part_name);
>               return 1;
>       }

_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to