From: Danilo Krummrich <dakr@kernel.org>
To: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
louis.chauvet@bootlin.com, hamohammed.sa@gmail.com,
melissa.srw@gmail.com, lyude@redhat.com,
gregkh@linuxfoundation.org, rafael@kernel.org
Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Danilo Krummrich <dakr@kernel.org>
Subject: [PATCH 2/2] drm: vkms: do not use devres groups
Date: Thu, 29 Jan 2026 00:20:34 +0100 [thread overview]
Message-ID: <20260128232038.2399-2-dakr@kernel.org> (raw)
In-Reply-To: <20260128232038.2399-1-dakr@kernel.org>
Using devres groups in vkms is unnecessary, as the corresponding cleanup
happens automatically when the device is unbound through
faux_device_destroy().
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
drivers/gpu/drm/vkms/vkms_drv.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
index 434c295f44ba..585fd642281c 100644
--- a/drivers/gpu/drm/vkms/vkms_drv.c
+++ b/drivers/gpu/drm/vkms/vkms_drv.c
@@ -169,16 +169,11 @@ int vkms_create(struct vkms_config *config)
if (!fdev)
return -ENODEV;
- if (!devres_open_group(&fdev->dev, NULL, GFP_KERNEL)) {
- ret = -ENOMEM;
- goto out_unregister;
- }
-
vkms_device = devm_drm_dev_alloc(&fdev->dev, &vkms_driver,
struct vkms_device, drm);
if (IS_ERR(vkms_device)) {
ret = PTR_ERR(vkms_device);
- goto out_devres;
+ goto out;
}
vkms_device->faux_dev = fdev;
vkms_device->config = config;
@@ -189,33 +184,31 @@ int vkms_create(struct vkms_config *config)
if (ret) {
DRM_ERROR("Could not initialize DMA support\n");
- goto out_devres;
+ goto out;
}
ret = drm_vblank_init(&vkms_device->drm,
vkms_config_get_num_crtcs(config));
if (ret) {
DRM_ERROR("Failed to vblank\n");
- goto out_devres;
+ goto out;
}
ret = vkms_modeset_init(vkms_device);
if (ret)
- goto out_devres;
+ goto out;
vkms_config_register_debugfs(vkms_device);
ret = drm_dev_register(&vkms_device->drm, 0);
if (ret)
- goto out_devres;
+ goto out;
drm_client_setup(&vkms_device->drm, NULL);
return 0;
-out_devres:
- devres_release_group(&fdev->dev, NULL);
-out_unregister:
+out:
faux_device_destroy(fdev);
return ret;
}
@@ -262,7 +255,6 @@ void vkms_destroy(struct vkms_config *config)
drm_colorop_pipeline_destroy(&config->dev->drm);
drm_dev_unregister(&config->dev->drm);
drm_atomic_helper_shutdown(&config->dev->drm);
- devres_release_group(&fdev->dev, NULL);
faux_device_destroy(fdev);
config->dev = NULL;
--
2.52.0
prev parent reply other threads:[~2026-01-28 23:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 23:20 [PATCH 1/2] drm: vgem: do not use devres groups Danilo Krummrich
2026-01-28 23:20 ` Danilo Krummrich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260128232038.2399-2-dakr@kernel.org \
--to=dakr@kernel.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=hamohammed.sa@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=louis.chauvet@bootlin.com \
--cc=lyude@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=melissa.srw@gmail.com \
--cc=mripard@kernel.org \
--cc=rafael@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox