summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-08-22 04:33:36 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-08-22 04:33:36 +0000
commit0ba3f18a17dfb57274f741079807683eca0c393b (patch)
tree1f37c09cca18398a2acb04e3951003d4bb15d97b /sys/dev/pci
parent3bdfccfa37ff106ae173e46660912e6063881b6e (diff)
drm/debugfs: fix plain echo to connector "force" attribute
From Michael Tretter 740bd6f688e1e2fdb4894f588162a2baa3513f52 in linux 5.7.y/5.7.16 c704b17071c4dc571dca3af4e4151dac51de081a in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/drm_debugfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/drm_debugfs.c b/sys/dev/pci/drm/drm_debugfs.c
index e5bc9b7697e..8d551bd9238 100644
--- a/sys/dev/pci/drm/drm_debugfs.c
+++ b/sys/dev/pci/drm/drm_debugfs.c
@@ -336,13 +336,13 @@ static ssize_t connector_write(struct file *file, const char __user *ubuf,
buf[len] = '\0';
- if (!strcmp(buf, "on"))
+ if (sysfs_streq(buf, "on"))
connector->force = DRM_FORCE_ON;
- else if (!strcmp(buf, "digital"))
+ else if (sysfs_streq(buf, "digital"))
connector->force = DRM_FORCE_ON_DIGITAL;
- else if (!strcmp(buf, "off"))
+ else if (sysfs_streq(buf, "off"))
connector->force = DRM_FORCE_OFF;
- else if (!strcmp(buf, "unspecified"))
+ else if (sysfs_streq(buf, "unspecified"))
connector->force = DRM_FORCE_UNSPECIFIED;
else
return -EINVAL;