Message ID | 20200415074034.175360-18-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=FYuf=57=lists.freedesktop.org=dri-devel-bounces@kernel.org> 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 554666CA for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 15 Apr 2020 07:41:59 +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 3428920771 for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 15 Apr 2020 07:41:59 +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="VruuaKyP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3428920771 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3F106E8A0; Wed, 15 Apr 2020 07:41:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA20E6E896 for <dri-devel@lists.freedesktop.org>; Wed, 15 Apr 2020 07:40:59 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id a25so17884181wrd.0 for <dri-devel@lists.freedesktop.org>; Wed, 15 Apr 2020 00:40:59 -0700 (PDT) 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=AJNLXELlGSwI8GqzdIq/q8fVeAI+ALD0AehIQsFWNJo=; b=VruuaKyP0hrhOgpg/QMkfSfoJ1ksy5grFRZIfAG4H0V0BZMtv+5PyqSwbC7Wznuetd wylmKgwdeihILQsn2oEHAdb7Hx4d5NbDj+vpmK4Dq0eL9aRe1VNZ17cuGsq8qx34mzdp SHb6Mwq5Mtyplap2r+1Y0/2QeFAB1wG8XJ4Xs= 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=AJNLXELlGSwI8GqzdIq/q8fVeAI+ALD0AehIQsFWNJo=; b=UskA0K+RXn/mn65AAaxKwMYP52SWjhmYR4/5EGnHfbWgItWsVGN0Zl1yncTLNYPPuV wwI8B980LwbEECYmjJN4dKXhYpM15lyRdrX8UMhEGayxKDRIzQmpEO6Ucy9vBhvUQKDB 4oEswp4uXQsFd8cvTf00e53juW87Kjq/v1kLPcUA6U8REhX8ykrHrcnSCXPzoO58DK5f vOpqJZz+sosBnfoxFpYd6Bcs+UWHbpAvWybXUACp9skICOhZfCCwfnMhE0YpSuwafteY ytdP6hzWZbH+CPiOyEFxras3U/Kdko+Ian/BAjnqITM5i22XsbHNc6KfcJvbgt5PQPn0 JuOg== X-Gm-Message-State: AGi0PubE4nMDJy+I1xyLPVgs+D3Y1Ms/kj81X2/oxlYEn2Zr7QQwh9S1 P9HkhgNXcD5d+VmDRfan0UDcow== X-Google-Smtp-Source: APiQypLew8WjJQIKHusqN1Dahpvoi75BI5oxRb5uxMe3JgTpqa04MCbiDqj+YUGtdD2A+11YKSoObw== X-Received: by 2002:adf:dbce:: with SMTP id e14mr26060493wrj.337.1586936458589; Wed, 15 Apr 2020 00:40:58 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id u30sm1878552wru.13.2020.04.15.00.40.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 00:40:58 -0700 (PDT) From: Daniel Vetter <daniel.vetter@ffwll.ch> To: Intel Graphics Development <intel-gfx@lists.freedesktop.org> Subject: [PATCH 17/59] drm/ili9486: Use devm_drm_dev_alloc Date: Wed, 15 Apr 2020 09:39:52 +0200 Message-Id: <20200415074034.175360-18-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200415074034.175360-1-daniel.vetter@ffwll.ch> References: <20200415074034.175360-1-daniel.vetter@ffwll.ch> 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 <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, DRI Development <dri-devel@lists.freedesktop.org>, Daniel Vetter <daniel.vetter@intel.com>, Kamlesh Gurudasani <kamlesh.gurudasani@gmail.com>, Sam Ravnborg <sam@ravnborg.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
devm_drm_dev_alloc, v2
|
expand
|
diff --git a/drivers/gpu/drm/tiny/ili9486.c b/drivers/gpu/drm/tiny/ili9486.c index c4079bf9e2c8..2702ea557d29 100644 --- a/drivers/gpu/drm/tiny/ili9486.c +++ b/drivers/gpu/drm/tiny/ili9486.c @@ -197,18 +197,13 @@ static int ili9486_probe(struct spi_device *spi) u32 rotation = 0; int ret; - dbidev = kzalloc(sizeof(*dbidev), GFP_KERNEL); - if (!dbidev) - return -ENOMEM; + dbidev = devm_drm_dev_alloc(dev, &ili9486_driver, + struct mipi_dbi_dev, drm); + if (IS_ERR(dbidev)) + return PTR_ERR(dbidev); dbi = &dbidev->dbi; drm = &dbidev->drm; - ret = devm_drm_dev_init(dev, drm, &ili9486_driver); - if (ret) { - kfree(dbidev); - return ret; - } - drmm_add_final_kfree(drm, dbidev); dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(dbi->reset)) {