]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/base/sys.c
Merge git://git.infradead.org/mtd-2.6
[linux-2.6-omap-h63xx.git] / drivers / base / sys.c
index 3ca9c5e8d765cd4426ea29422dbf8e47d2ae462b..c98c31ec2f752189e2481a278ed8e7f02cf01985 100644 (file)
@@ -488,7 +488,8 @@ ssize_t sysdev_store_ulong(struct sys_device *sysdev,
        if (end == buf)
                return -EINVAL;
        *(unsigned long *)(ea->var) = new;
-       return end - buf;
+       /* Always return full write size even if we didn't consume all */
+       return size;
 }
 EXPORT_SYMBOL_GPL(sysdev_store_ulong);
 
@@ -511,7 +512,8 @@ ssize_t sysdev_store_int(struct sys_device *sysdev,
        if (end == buf || new > INT_MAX || new < INT_MIN)
                return -EINVAL;
        *(int *)(ea->var) = new;
-       return end - buf;
+       /* Always return full write size even if we didn't consume all */
+       return size;
 }
 EXPORT_SYMBOL_GPL(sysdev_store_int);