From patchwork Tue Oct 26 11:34:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Matheus Andrade Torrente X-Patchwork-Id: 12584637 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44739C433EF for ; Tue, 26 Oct 2021 11:34:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 140A8604E9 for ; Tue, 26 Oct 2021 11:34:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 140A8604E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6661289CFA; Tue, 26 Oct 2021 11:34:34 +0000 (UTC) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by gabe.freedesktop.org (Postfix) with ESMTPS id A489E89CC4 for ; Tue, 26 Oct 2021 11:34:29 +0000 (UTC) Received: by mail-qt1-x836.google.com with SMTP id y11so13092316qtn.13 for ; Tue, 26 Oct 2021 04:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g8AjUosguFFwtSTTUN5QcdLFCu3iDK1fKV4GOcMHHcY=; b=pIvdM+bPSllROd9J58XWZfllhzU8vWSjbRvnbm5a04KeMQq6iA8iRwvZOJEMuOmcoH CAH8/fCIERo6Mu+xvk5ItQiBgD96zTa5dhGSlTr0lr+0hLWO+Rj/MHRryB2fEa01O2R1 HTiHYXXAhmpFrIt7BZGQBN5VnC4VVuttXWHhB2/PBh+3fs4NElCZmSHGX2OFqyIHy4Fu sNxuMnBxLEJvrw5sLKzSnVwa98U3Gd0DKAsr9Ra1F9qq+wEs4GnySvJ71SogcHgL/zIR hAThQ+uQPDSeDR9XT/PFo4RP7ybZO7XgwfLDPQlRJejQ+GWsUjprxFwcWJRn3te6OWsK Pl/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g8AjUosguFFwtSTTUN5QcdLFCu3iDK1fKV4GOcMHHcY=; b=xzmN0m4hpcVa+b0sOXyO9okd8YIAlDY4JWzWarPSZ2DdBK9AfiW93pVygPZ52ZWxba lFPc+7TcYgGJ0DiN/X2dw9MxjksdbbeeJwvMKGWX7fyY+Ucb6WXUROUmtIj4PUbvTSP+ Zypz50gEw3hLJ/xXQjUpA8psfB356iPdJHrdsYHIjOjlRdm94lvd4mSvjfpXBTXLgW2g niLusm0TVmqsrQN9ABRxwjqxczO8W5Tl2EeYkyNYmUX9td/M178NUUjfKFdvfw9m5ynJ qvZEbFY/UeUSbBByh7EzwmC2EWLEgmwd3u+80jyAGKyLfnyQEkEIoNAURZBzxcCWsP7w 7y1Q== X-Gm-Message-State: AOAM532HeYDTytcV3tJukHw6Prc5yhZQVzSveRwBoeryM8ZBrVUjlxI0 Gmge2CTe6+PU5U38MGMsn1c= X-Google-Smtp-Source: ABdhPJwNCqGvoofJDphLJuI8ugs3EZ27U14tagTGxGaPD5Pu0+v5MIh7QJPEAY6vC6d5cZvEebvc4A== X-Received: by 2002:ac8:610b:: with SMTP id a11mr23622405qtm.182.1635248068893; Tue, 26 Oct 2021 04:34:28 -0700 (PDT) Received: from localhost.localdomain ([2804:431:c7f4:5469:b11e:67b8:49d2:1744]) by smtp.googlemail.com with ESMTPSA id f3sm11117691qko.32.2021.10.26.04.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 04:34:28 -0700 (PDT) From: Igor Torrente To: rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com, ppaalanen@gmail.com, tzimmermann@suse.de Cc: Igor Torrente , hamohammed.sa@gmail.com, daniel@ffwll.ch, airlied@linux.ie, contact@emersion.fr, leandro.ribeiro@collabora.com, dri-devel@lists.freedesktop.org Subject: [PATCH v2 1/8] drm: vkms: Replace the deprecated drm_mode_config_init Date: Tue, 26 Oct 2021 08:34:01 -0300 Message-Id: <20211026113409.7242-2-igormtorrente@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211026113409.7242-1-igormtorrente@gmail.com> References: <20211026113409.7242-1-igormtorrente@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Torrente --- V2: Change the code style(Thomas Zimmermann). --- drivers/gpu/drm/vkms/vkms_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c index 0ffe5f0e33f7..ee4d96dabe19 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.c +++ b/drivers/gpu/drm/vkms/vkms_drv.c @@ -140,8 +140,12 @@ 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; + + ret = drmm_mode_config_init(dev); + if (ret < 0) + 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;