Skip to contentSkip to conversation

drm: sysfs: Replace magic number with DRM_FORCE_UNSPECIFIED macro

PATCH In review hongao 2 participants 2 messages May 16, 2025 – May 24, 2025

Subsystems (2)
lore
Share & tools
lore

hongao

author
#0 lore raw

PATCH 1/1 drm: sysfs: Replace magic number with DRM_FORCE_UNSPECIFIED macro

Replace the direct use of magic number '0' with the DRM_FORCE_UNSPECIFIED macro to improve code readability.

drivers/gpu/drm/drm_sysfs.c +1 -1
index 60c1f26edb6f..e9e67ef0904d 100644
@@ -198,7 +198,7 @@ static ssize_t status_store(struct device *device,
 	old_force = connector->force;
 
 	if (sysfs_streq(buf, "detect"))
-		connector->force = 0;
+		connector->force = DRM_FORCE_UNSPECIFIED;
 	else if (sysfs_streq(buf, "on"))
 		connector->force = DRM_FORCE_ON;
 	else if (sysfs_streq(buf, "on-digital"))
Signature · 1 line
2.33.1