diff options
Diffstat (limited to 'drivers/mtd/ubi/cdev.c')
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 633ac82bbd22..2364c00f66d0 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c | |||
@@ -63,7 +63,7 @@ static int get_exclusive(struct ubi_volume_desc *desc) | |||
63 | users = vol->readers + vol->writers + vol->exclusive; | 63 | users = vol->readers + vol->writers + vol->exclusive; |
64 | ubi_assert(users > 0); | 64 | ubi_assert(users > 0); |
65 | if (users > 1) { | 65 | if (users > 1) { |
66 | dbg_err("%d users for volume %d", users, vol->vol_id); | 66 | ubi_err("%d users for volume %d", users, vol->vol_id); |
67 | err = -EBUSY; | 67 | err = -EBUSY; |
68 | } else { | 68 | } else { |
69 | vol->readers = vol->writers = 0; | 69 | vol->readers = vol->writers = 0; |
@@ -159,7 +159,7 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin) | |||
159 | 159 | ||
160 | if (vol->updating) { | 160 | if (vol->updating) { |
161 | /* Update is in progress, seeking is prohibited */ | 161 | /* Update is in progress, seeking is prohibited */ |
162 | dbg_err("updating"); | 162 | ubi_err("updating"); |
163 | return -EBUSY; | 163 | return -EBUSY; |
164 | } | 164 | } |
165 | 165 | ||
@@ -178,7 +178,7 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin) | |||
178 | } | 178 | } |
179 | 179 | ||
180 | if (new_offset < 0 || new_offset > vol->used_bytes) { | 180 | if (new_offset < 0 || new_offset > vol->used_bytes) { |
181 | dbg_err("bad seek %lld", new_offset); | 181 | ubi_err("bad seek %lld", new_offset); |
182 | return -EINVAL; | 182 | return -EINVAL; |
183 | } | 183 | } |
184 | 184 | ||
@@ -216,11 +216,11 @@ static ssize_t vol_cdev_read(struct file *file, __user char *buf, size_t count, | |||
216 | count, *offp, vol->vol_id); | 216 | count, *offp, vol->vol_id); |
217 | 217 | ||
218 | if (vol->updating) { | 218 | if (vol->updating) { |
219 | dbg_err("updating"); | 219 | ubi_err("updating"); |
220 | return -EBUSY; | 220 | return -EBUSY; |
221 | } | 221 | } |
222 | if (vol->upd_marker) { | 222 | if (vol->upd_marker) { |
223 | dbg_err("damaged volume, update marker is set"); | 223 | ubi_err("damaged volume, update marker is set"); |
224 | return -EBADF; | 224 | return -EBADF; |
225 | } | 225 | } |
226 | if (*offp == vol->used_bytes || count == 0) | 226 | if (*offp == vol->used_bytes || count == 0) |
@@ -300,7 +300,7 @@ static ssize_t vol_cdev_direct_write(struct file *file, const char __user *buf, | |||
300 | 300 | ||
301 | lnum = div_u64_rem(*offp, vol->usable_leb_size, &off); | 301 | lnum = div_u64_rem(*offp, vol->usable_leb_size, &off); |
302 | if (off & (ubi->min_io_size - 1)) { | 302 | if (off & (ubi->min_io_size - 1)) { |
303 | dbg_err("unaligned position"); | 303 | ubi_err("unaligned position"); |
304 | return -EINVAL; | 304 | return -EINVAL; |
305 | } | 305 | } |
306 | 306 | ||
@@ -309,7 +309,7 @@ static ssize_t vol_cdev_direct_write(struct file *file, const char __user *buf, | |||
309 | 309 | ||
310 | /* We can write only in fractions of the minimum I/O unit */ | 310 | /* We can write only in fractions of the minimum I/O unit */ |
311 | if (count & (ubi->min_io_size - 1)) { | 311 | if (count & (ubi->min_io_size - 1)) { |
312 | dbg_err("unaligned write length"); | 312 | ubi_err("unaligned write length"); |
313 | return -EINVAL; | 313 | return -EINVAL; |
314 | } | 314 | } |
315 | 315 | ||
@@ -643,7 +643,7 @@ static int verify_mkvol_req(const struct ubi_device *ubi, | |||
643 | return 0; | 643 | return 0; |
644 | 644 | ||
645 | bad: | 645 | bad: |
646 | dbg_err("bad volume creation request"); | 646 | ubi_err("bad volume creation request"); |
647 | ubi_dump_mkvol_req(req); | 647 | ubi_dump_mkvol_req(req); |
648 | return err; | 648 | return err; |
649 | } | 649 | } |
@@ -709,12 +709,12 @@ static int rename_volumes(struct ubi_device *ubi, | |||
709 | for (i = 0; i < req->count - 1; i++) { | 709 | for (i = 0; i < req->count - 1; i++) { |
710 | for (n = i + 1; n < req->count; n++) { | 710 | for (n = i + 1; n < req->count; n++) { |
711 | if (req->ents[i].vol_id == req->ents[n].vol_id) { | 711 | if (req->ents[i].vol_id == req->ents[n].vol_id) { |
712 | dbg_err("duplicated volume id %d", | 712 | ubi_err("duplicated volume id %d", |
713 | req->ents[i].vol_id); | 713 | req->ents[i].vol_id); |
714 | return -EINVAL; | 714 | return -EINVAL; |
715 | } | 715 | } |
716 | if (!strcmp(req->ents[i].name, req->ents[n].name)) { | 716 | if (!strcmp(req->ents[i].name, req->ents[n].name)) { |
717 | dbg_err("duplicated volume name \"%s\"", | 717 | ubi_err("duplicated volume name \"%s\"", |
718 | req->ents[i].name); | 718 | req->ents[i].name); |
719 | return -EINVAL; | 719 | return -EINVAL; |
720 | } | 720 | } |
@@ -737,7 +737,7 @@ static int rename_volumes(struct ubi_device *ubi, | |||
737 | re->desc = ubi_open_volume(ubi->ubi_num, vol_id, UBI_EXCLUSIVE); | 737 | re->desc = ubi_open_volume(ubi->ubi_num, vol_id, UBI_EXCLUSIVE); |
738 | if (IS_ERR(re->desc)) { | 738 | if (IS_ERR(re->desc)) { |
739 | err = PTR_ERR(re->desc); | 739 | err = PTR_ERR(re->desc); |
740 | dbg_err("cannot open volume %d, error %d", vol_id, err); | 740 | ubi_err("cannot open volume %d, error %d", vol_id, err); |
741 | kfree(re); | 741 | kfree(re); |
742 | goto out_free; | 742 | goto out_free; |
743 | } | 743 | } |
@@ -796,7 +796,7 @@ static int rename_volumes(struct ubi_device *ubi, | |||
796 | continue; | 796 | continue; |
797 | 797 | ||
798 | /* The volume exists but busy, or an error occurred */ | 798 | /* The volume exists but busy, or an error occurred */ |
799 | dbg_err("cannot open volume \"%s\", error %d", | 799 | ubi_err("cannot open volume \"%s\", error %d", |
800 | re->new_name, err); | 800 | re->new_name, err); |
801 | goto out_free; | 801 | goto out_free; |
802 | } | 802 | } |