]> git.baikalelectronics.ru Git - kernel.git/commit
drm: fix writing to /sys/class/drm/*/status
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 5 Jun 2015 22:27:30 +0000 (08:27 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 5 Jun 2015 22:27:30 +0000 (08:27 +1000)
commit5ad1d64e57f498f5d3af9a156c7772d62e0a14a3
tree2c974617cfea69d8f1ebe156d4bce160d354abb5
parentbd39366e2d019b96ee1159d979c102eaa60ebf30
drm: fix writing to /sys/class/drm/*/status

Writing to a file is supposed to return the number of bytes written.
Returning zero unfortunately causes bash to constantly spin trying
to write to the sysfs file, to such an extent that even ^c and ^z
have no effect.  The only way out of that is to kill the shell and
log back in.  This isn't nice behaviour.

Fix it by returning the number of characters written to sysfs files.

[airlied: used suggestion from Al Viro]
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_sysfs.c