summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2016-07-04 16:06:51 -0400
committerRichard Weinberger <richard@nod.at>2016-07-29 17:31:55 -0400
commitbc743f34dfa011e62edd0ea4ae8455be06c083b5 (patch)
treedc5b33a3d35820944389674b1a1fd4f30875d950 /drivers/mtd/ubi
parent95b54e1e10eb32c465d1028dd119ee790afe4a01 (diff)
ubi: Fix early logging
We cannot use ubi_* logging functions before the UBI object is initialized. Cc: <stable@vger.kernel.org> Fixes: 3260870331 ("UBI: Extend UBI layer debug/messaging capabilities") Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/build.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 5d524a04d0a3..0680516bb472 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -874,7 +874,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
874 for (i = 0; i < UBI_MAX_DEVICES; i++) { 874 for (i = 0; i < UBI_MAX_DEVICES; i++) {
875 ubi = ubi_devices[i]; 875 ubi = ubi_devices[i];
876 if (ubi && mtd->index == ubi->mtd->index) { 876 if (ubi && mtd->index == ubi->mtd->index) {
877 ubi_err(ubi, "mtd%d is already attached to ubi%d", 877 pr_err("ubi: mtd%d is already attached to ubi%d",
878 mtd->index, i); 878 mtd->index, i);
879 return -EEXIST; 879 return -EEXIST;
880 } 880 }
@@ -889,7 +889,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
889 * no sense to attach emulated MTD devices, so we prohibit this. 889 * no sense to attach emulated MTD devices, so we prohibit this.
890 */ 890 */
891 if (mtd->type == MTD_UBIVOLUME) { 891 if (mtd->type == MTD_UBIVOLUME) {
892 ubi_err(ubi, "refuse attaching mtd%d - it is already emulated on top of UBI", 892 pr_err("ubi: refuse attaching mtd%d - it is already emulated on top of UBI",
893 mtd->index); 893 mtd->index);
894 return -EINVAL; 894 return -EINVAL;
895 } 895 }
@@ -900,7 +900,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
900 if (!ubi_devices[ubi_num]) 900 if (!ubi_devices[ubi_num])
901 break; 901 break;
902 if (ubi_num == UBI_MAX_DEVICES) { 902 if (ubi_num == UBI_MAX_DEVICES) {
903 ubi_err(ubi, "only %d UBI devices may be created", 903 pr_err("ubi: only %d UBI devices may be created",
904 UBI_MAX_DEVICES); 904 UBI_MAX_DEVICES);
905 return -ENFILE; 905 return -ENFILE;
906 } 906 }
@@ -910,7 +910,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
910 910
911 /* Make sure ubi_num is not busy */ 911 /* Make sure ubi_num is not busy */
912 if (ubi_devices[ubi_num]) { 912 if (ubi_devices[ubi_num]) {
913 ubi_err(ubi, "already exists"); 913 pr_err("ubi: ubi%i already exists", ubi_num);
914 return -EEXIST; 914 return -EEXIST;
915 } 915 }
916 } 916 }