xtensa simdisk: Fix proc_create_data() conversion fallout
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 9 May 2013 12:08:31 +0000 (14:08 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 9 May 2013 17:20:20 +0000 (13:20 -0400)
arch/xtensa/platforms/iss/simdisk.c: In function 'proc_read_simdisk':
arch/xtensa/platforms/iss/simdisk.c:220:12: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
arch/xtensa/platforms/iss/simdisk.c: In function 'proc_write_simdisk':
arch/xtensa/platforms/iss/simdisk.c:241:38: error: 'buffer' undeclared (first use in this function)
arch/xtensa/platforms/iss/simdisk.c:241:38: note: each undeclared identifier is reported only once for each function it appears in

Introduced by commit a69755b187749e7cc020e17127a54f395aea4eaa ("xtensa
simdisk: switch to proc_create_data()")

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/xtensa/platforms/iss/simdisk.c

index 0345f43d34f365c98e73bbed0659dc62911bbce2..fc3c91fd20f70ff07ff2efd791cc91d96096e89f 100644 (file)
@@ -217,7 +217,7 @@ static ssize_t proc_read_simdisk(struct file *file, char __user *buf,
                        size_t size, loff_t *ppos)
 {
        struct simdisk *dev = PDE_DATA(file_inode(file));
-       char *s = dev->filename;
+       const char *s = dev->filename;
        if (s) {
                ssize_t n = simple_read_from_buffer(buf, size, ppos,
                                                        s, strlen(s));
@@ -238,7 +238,7 @@ static ssize_t proc_write_simdisk(struct file *file, const char __user *buf,
 
        if (tmp == NULL)
                return -ENOMEM;
-       if (copy_from_user(tmp, buffer, count)) {
+       if (copy_from_user(tmp, buf, count)) {
                err = -EFAULT;
                goto out_free;
        }