[PATCH 1/6] drm: vkms: Replace the deprecated drm_mode_config_init
Thomas Zimmermann
tzimmermann at suse.de
Mon Oct 18 10:02:40 UTC 2021
Hi
Am 05.10.21 um 22:16 schrieb Igor Matheus Andrade Torrente:
> The `drm_mode_config_init` was deprecated since c3b790e commit, and it's
> being replaced by the `drmm_mode_config_init`.
>
> Signed-off-by: Igor Matheus Andrade Torrente <igormtorrente at gmail.com>
> ---
> drivers/gpu/drm/vkms/vkms_drv.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
> index 0ffe5f0e33f7..828868920494 100644
> --- a/drivers/gpu/drm/vkms/vkms_drv.c
> +++ b/drivers/gpu/drm/vkms/vkms_drv.c
> @@ -140,8 +140,11 @@ static const struct drm_mode_config_helper_funcs vkms_mode_config_helpers = {
> static int vkms_modeset_init(struct vkms_device *vkmsdev)
> {
> struct drm_device *dev = &vkmsdev->drm;
> + int ret = drmm_mode_config_init(dev);
> +
> + if (ret < 0)
> + return ret;
The style looks awkward IMHO. Rather use
int ret
ret = drmm_mode_config_init()
if (ret)
return ret;
>
> - drm_mode_config_init(dev);
> dev->mode_config.funcs = &vkms_mode_funcs;
> dev->mode_config.min_width = XRES_MIN;
> dev->mode_config.min_height = YRES_MIN;
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20211018/8e7d2297/attachment.sig>
More information about the dri-devel
mailing list