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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:38 +0000 (08:23 +0200)
commit740bd6f688e1e2fdb4894f588162a2baa3513f52
treee67f893e337883bbc3906e3668a842a3eec1aded
parent09ec15c17505c26e3bfbc4988cd072a10ee14c50
drm/debugfs: fix plain echo to connector "force" attribute

[ Upstream commit c704b17071c4dc571dca3af4e4151dac51de081a ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/drm_debugfs.c