Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / drivers / mtd / ubi / gluebi.c
index 941bc3c..dd8f6bd 100644 (file)
@@ -41,7 +41,7 @@
 #include "ubi-media.h"
 
 #define err_msg(fmt, ...)                                   \
-       printk(KERN_DEBUG "gluebi (pid %d): %s: " fmt "\n", \
+       pr_err("gluebi (pid %d): %s: " fmt "\n",            \
               current->pid, __func__, ##__VA_ARGS__)
 
 /**
@@ -238,7 +238,7 @@ static int gluebi_write(struct mtd_info *mtd, loff_t to, size_t len,
                if (to_write > total_written)
                        to_write = total_written;
 
-               err = ubi_write(gluebi->desc, lnum, buf, offs, to_write);
+               err = ubi_leb_write(gluebi->desc, lnum, buf, offs, to_write);
                if (err)
                        break;
 
@@ -360,9 +360,8 @@ static int gluebi_create(struct ubi_device_info *di,
        mutex_lock(&devices_mutex);
        g = find_gluebi_nolock(vi->ubi_num, vi->vol_id);
        if (g)
-               err_msg("gluebi MTD device %d form UBI device %d volume %d "
-                       "already exists", g->mtd.index, vi->ubi_num,
-                       vi->vol_id);
+               err_msg("gluebi MTD device %d form UBI device %d volume %d already exists",
+                       g->mtd.index, vi->ubi_num, vi->vol_id);
        mutex_unlock(&devices_mutex);
 
        if (mtd_device_register(mtd, NULL, 0)) {
@@ -395,8 +394,8 @@ static int gluebi_remove(struct ubi_volume_info *vi)
        mutex_lock(&devices_mutex);
        gluebi = find_gluebi_nolock(vi->ubi_num, vi->vol_id);
        if (!gluebi) {
-               err_msg("got remove notification for unknown UBI device %d "
-                       "volume %d", vi->ubi_num, vi->vol_id);
+               err_msg("got remove notification for unknown UBI device %d volume %d",
+                       vi->ubi_num, vi->vol_id);
                err = -ENOENT;
        } else if (gluebi->refcnt)
                err = -EBUSY;
@@ -409,9 +408,8 @@ static int gluebi_remove(struct ubi_volume_info *vi)
        mtd = &gluebi->mtd;
        err = mtd_device_unregister(mtd);
        if (err) {
-               err_msg("cannot remove fake MTD device %d, UBI device %d, "
-                       "volume %d, error %d", mtd->index, gluebi->ubi_num,
-                       gluebi->vol_id, err);
+               err_msg("cannot remove fake MTD device %d, UBI device %d, volume %d, error %d",
+                       mtd->index, gluebi->ubi_num, gluebi->vol_id, err);
                mutex_lock(&devices_mutex);
                list_add_tail(&gluebi->list, &gluebi_devices);
                mutex_unlock(&devices_mutex);
@@ -441,8 +439,8 @@ static int gluebi_updated(struct ubi_volume_info *vi)
        gluebi = find_gluebi_nolock(vi->ubi_num, vi->vol_id);
        if (!gluebi) {
                mutex_unlock(&devices_mutex);
-               err_msg("got update notification for unknown UBI device %d "
-                       "volume %d", vi->ubi_num, vi->vol_id);
+               err_msg("got update notification for unknown UBI device %d volume %d",
+                       vi->ubi_num, vi->vol_id);
                return -ENOENT;
        }
 
@@ -468,8 +466,8 @@ static int gluebi_resized(struct ubi_volume_info *vi)
        gluebi = find_gluebi_nolock(vi->ubi_num, vi->vol_id);
        if (!gluebi) {
                mutex_unlock(&devices_mutex);
-               err_msg("got update notification for unknown UBI device %d "
-                       "volume %d", vi->ubi_num, vi->vol_id);
+               err_msg("got update notification for unknown UBI device %d volume %d",
+                       vi->ubi_num, vi->vol_id);
                return -ENOENT;
        }
        gluebi->mtd.size = vi->used_bytes;
@@ -526,9 +524,9 @@ static void __exit ubi_gluebi_exit(void)
 
                err = mtd_device_unregister(mtd);
                if (err)
-                       err_msg("error %d while removing gluebi MTD device %d, "
-                               "UBI device %d, volume %d - ignoring", err,
-                               mtd->index, gluebi->ubi_num, gluebi->vol_id);
+                       err_msg("error %d while removing gluebi MTD device %d, UBI device %d, volume %d - ignoring",
+                               err, mtd->index, gluebi->ubi_num,
+                               gluebi->vol_id);
                kfree(mtd->name);
                kfree(gluebi);
        }