]> git.baikalelectronics.ru Git - kernel.git/commit
drm/debugfs: fix plain echo to connector "force" attribute
authorMichael Tretter <m.tretter@pengutronix.de>
Thu, 17 Aug 2017 10:43:07 +0000 (12:43 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sun, 17 May 2020 16:27:57 +0000 (17:27 +0100)
commitd9e02a182d65cd561df7b80b7054b87b0e64ac12
treec016ab65c72baa0ff73c731f19a05a691d370fba
parent643156028873bc88e9c450a08eb5e77ba868f29a
drm/debugfs: fix plain echo to connector "force" attribute

Using plain echo to set the "force" connector attribute fails with
-EINVAL, because echo appends a newline to the output.

Replace strcmp with sysfs_streq to also accept strings that end with a
newline.

v2: use sysfs_streq instead of stripping trailing whitespace

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170817104307.17124-1-m.tretter@pengutronix.de
drivers/gpu/drm/drm_debugfs.c