[U-Boot] [RFC PATCH] console/device: rework function naming
Magnus Lilja
lilja.magnus at gmail.com
Sun May 3 19:54:13 CEST 2009
Hi Jean-Christophe,
2009/5/3 Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>:
> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
> index f4b01a9..9b94ddc 100644
> --- a/drivers/mtd/ubi/build.c
> +++ b/drivers/mtd/ubi/build.c
> @@ -291,7 +291,7 @@ static int ubi_sysfs_init(struct ubi_device *ubi)
> ubi->dev.devt = ubi->cdev.dev;
> ubi->dev.class = ubi_class;
> sprintf(&ubi->dev.bus_id[0], UBI_NAME_STR"%d", ubi->ubi_num);
> - err = device_register(&ubi->dev);
> + err = console_register(&ubi->dev);
I'm not that familiar with device_*() in U-boot, but it surprised me
to see the above change which is in the UBI layer and should not have
anything to do with consoles. Also the above code is within a #ifdef
UBI_LINUX block and is not used in U-boot.
> diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
> index 061da64..2b6b137 100644
> --- a/drivers/mtd/ubi/vmt.c
> +++ b/drivers/mtd/ubi/vmt.c
> @@ -337,7 +337,7 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req)
> vol->dev.class = ubi_class;
>
> sprintf(&vol->dev.bus_id[0], "%s_%d", ubi->ubi_name, vol->vol_id);
> - err = device_register(&vol->dev);
> + err = console_register(&vol->dev);
> if (err) {
> ubi_err("cannot register device");
> goto out_gluebi;
> @@ -646,7 +646,7 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol)
> vol->dev.devt = dev;
> vol->dev.class = ubi_class;
> sprintf(&vol->dev.bus_id[0], "%s_%d", ubi->ubi_name, vol->vol_id);
> - err = device_register(&vol->dev);
> + err = console_register(&vol->dev);
Again a bit surprised to find anything about consoles in the UBI code.
In contrast to my earlier comment, this code seems to be compiled
(i.e. it's not within #ifdef UBI_LINUX).
I'm guessing you did a global search/replace for
device_register=>console_register?
Regards, Magnus
More information about the U-Boot
mailing list