X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fbase%2Fsys.c;h=c98c31ec2f752189e2481a278ed8e7f02cf01985;hb=721d5dfe7e516954c501d5e9d0dfab379cf4241a;hp=75dd6e22faff531cf8d136223bdf379102c299f6;hpb=fb3b80614438f8b73b3879a19350439d6aa402da;p=~andy%2Flinux diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 75dd6e22faf..c98c31ec2f7 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c @@ -355,7 +355,7 @@ static void __sysdev_resume(struct sys_device *dev) * sysdev_suspend - Suspend all system devices. * @state: Power state to enter. * - * We perform an almost identical operation as sys_device_shutdown() + * We perform an almost identical operation as sysdev_shutdown() * above, though calling ->suspend() instead. Interrupts are disabled * when this called. Devices are responsible for both saving state and * quiescing or powering down the device. @@ -437,7 +437,7 @@ aux_driver: /** * sysdev_resume - Bring system devices back to life. * - * Similar to sys_device_suspend(), but we iterate the list forwards + * Similar to sysdev_suspend(), but we iterate the list forwards * to guarantee that parent devices are resumed before their children. * * Note: Interrupts are disabled when called. @@ -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);