From patchwork Fri Feb 21 21:02:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11397355 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D45C1580 for ; Fri, 21 Feb 2020 21:03:44 +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 2C3102073A for ; Fri, 21 Feb 2020 21:03:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="Px3FNRZu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C3102073A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A3B26F51E; Fri, 21 Feb 2020 21:03:37 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id AC3326F51D for ; Fri, 21 Feb 2020 21:03:36 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id m10so6026605wmc.0 for ; Fri, 21 Feb 2020 13:03:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A32Oyg16k7K1G3w3F1On3uVOL/ANNStbxWkoAuT0iP8=; b=Px3FNRZuBNM9kP97Fif2WISlnt/i62yLgYUDPvmn3zO9RcJHXGAdgltblRor3KXvl6 dhyQ30goE5ICDVk9ZyfOJup0xm8+vacmdM2sMOu0/cTNjO4Var6+vJE1OC1UnRakt3Nx cN1XBBe3ODdFuX41HdBxhRbuZ/2MYljfrByTs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A32Oyg16k7K1G3w3F1On3uVOL/ANNStbxWkoAuT0iP8=; b=Uv5NqBU7hCnqdCNgHjSpJc6V/3pwEMcRU9rJ1I69gS0mPxqSQ4Bzegl9QTxjVeJRVI e6pU7o/frJtVPJrDcTwUxrcxejp3q4ZVZUNtEB5ji7DiZNM/h0LfGKSc3X9Am8QkLhFq qvuYKVNWL/GLjeB6BBB1JcO6DzWRltYWtL+5CN/rAabxHlRNG58k3gfHZYGW+qKHR0PS 3DVM2A0WxPEBj8r8rcxwVW0V96irdC2I7EXwHnLSBHtMxZlwtmI43y2swqBKUP70toz5 l3CA715vrgUz1CtSjm+mgrOI5CIsNwPaNh8N8nApC7H1lBLoZ13ISsUXZEzpl/LT0riD 5bEg== X-Gm-Message-State: APjAAAXAXWg3or1A1bfmLhk7pXj0oaaJuHnVKiEegrBvUgojcuohKDYK znim3Wqt1G7TehDsT24ODIqwcg== X-Google-Smtp-Source: APXvYqyegE2eC2W4Q4whqv8MfdxiywrB+P7F9IS66HncACmuOzYtvVEmZZoFytu76L9bpeSf7uRuBQ== X-Received: by 2002:a1c:c5:: with SMTP id 188mr5495828wma.187.1582319015348; Fri, 21 Feb 2020 13:03:35 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id z6sm5483930wrw.36.2020.02.21.13.03.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 13:03:34 -0800 (PST) From: Daniel Vetter To: DRI Development Date: Fri, 21 Feb 2020 22:02:33 +0100 Message-Id: <20200221210319.2245170-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200221210319.2245170-1-daniel.vetter@ffwll.ch> References: <20200221210319.2245170-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 05/51] drm/mipi_dbi: Use drmm_add_final_kfree in all drivers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Daniel Vetter , Intel Graphics Development , Maxime Ripard , Eric Anholt , =?utf-8?q?Noralf_Tr=C3=B8nnes?= , Thomas Zimmermann , Daniel Vetter , Kamlesh Gurudasani , Sam Ravnborg , David Lechner Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" They all share mipi_dbi_release so we need to switch them all together. With this we can drop the final kfree from the release function. Aside, I think we could perhaps have a tiny additional helper for these mipi_dbi drivers, the first few lines around devm_drm_dev_init are all the same (except for the drm_driver pointer). Reviewed-by: Noralf Trønnes Tested-by: Noralf Trønnes Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Eric Anholt Cc: David Lechner Cc: Kamlesh Gurudasani Cc: "Noralf Trønnes" Cc: Sam Ravnborg Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_mipi_dbi.c | 3 --- drivers/gpu/drm/tiny/hx8357d.c | 2 ++ drivers/gpu/drm/tiny/ili9225.c | 2 ++ drivers/gpu/drm/tiny/ili9341.c | 2 ++ drivers/gpu/drm/tiny/ili9486.c | 2 ++ drivers/gpu/drm/tiny/mi0283qt.c | 2 ++ drivers/gpu/drm/tiny/st7586.c | 2 ++ drivers/gpu/drm/tiny/st7735r.c | 2 ++ 8 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c index 558baf989f5a..069603dfcd10 100644 --- a/drivers/gpu/drm/drm_mipi_dbi.c +++ b/drivers/gpu/drm/drm_mipi_dbi.c @@ -588,13 +588,10 @@ EXPORT_SYMBOL(mipi_dbi_dev_init); */ void mipi_dbi_release(struct drm_device *drm) { - struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(drm); - DRM_DEBUG_DRIVER("\n"); drm_mode_config_cleanup(drm); drm_dev_fini(drm); - kfree(dbidev); } EXPORT_SYMBOL(mipi_dbi_release); diff --git a/drivers/gpu/drm/tiny/hx8357d.c b/drivers/gpu/drm/tiny/hx8357d.c index 9af8ff84974f..42bc5dadcb1c 100644 --- a/drivers/gpu/drm/tiny/hx8357d.c +++ b/drivers/gpu/drm/tiny/hx8357d.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include