aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Nikula <[email protected]>2024-05-10 12:09:51 +0300
committerVille Syrjälä <[email protected]>2024-05-10 20:56:12 +0300
commit11cdc8f2bde4bc548da6f995556c4b7183431088 (patch)
tree3af4ab2d48899ce1847ff6c9ffa693b4445fa08e
parenta918dcfecc36f87521eaf183812ec3496602f717 (diff)
drm: use "0" instead of "" for deprecated driver date
libdrm does not like the empty string for driver date. Use "0" instead, which has been used by virtio previously. Reported-by: Steven Price <[email protected]> Closes: https://lore.kernel.org/r/[email protected] Fixes: 7fb8af6798e8 ("drm: deprecate driver date") Signed-off-by: Jani Nikula <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Javier Martinez Canillas <[email protected]> Tested-by: Steven Price <[email protected]> Reviewed-by: Simon Ser <[email protected]>
-rw-r--r--drivers/gpu/drm/drm_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 89feb7306e47..51f39912866f 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -530,9 +530,9 @@ int drm_version(struct drm_device *dev, void *data,
err = drm_copy_field(version->name, &version->name_len,
dev->driver->name);
- /* Driver date is deprecated. Return the empty string. */
+ /* Driver date is deprecated. Userspace expects a non-empty string. */
if (!err)
- err = drm_copy_field(version->date, &version->date_len, "");
+ err = drm_copy_field(version->date, &version->date_len, "0");
if (!err)
err = drm_copy_field(version->desc, &version->desc_len,
dev->driver->desc);