From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC2E23EFD25 for ; Thu, 7 May 2026 11:53:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154836; cv=none; b=rokIXJIvXw5ZuuYZUlsx2WHnz5g/3ZQo0SU9eXSGrD8Jp/YxyWLfaYC7AAwYh21NLjclbV697JFpr8udSJhqLqpNr1pkA8NOlMfTNanqOs83pJv6ptv1XDgiGbBl4OXEF3m/MWmmQgGzPPL/LUG10+yuug3Cz3SQChww+pSxJGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778154836; c=relaxed/simple; bh=25oj7wjq/dxs/D21yMpSRSGXUTrYGO1ffOyXaGNA6ls=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ex3YsU7o4dKYS12i6g98NzLcDeFGnZYuzDvgwu8IGIhbWCA3TKvf5f0YqQMSdoF0gVcfSqXYwpRRBKhoEPiGus5UX3dzvLl9F4Pc4fgJ4CyklCdXcwmwNFzWAJXTIJGvLdgW5kIbYuQV0Ak4RB4NcSlyAyjTzK20OPC7EJ73/Ig= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NgxF4gU2; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NgxF4gU2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778154833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JfVAsWayUmpFaLGdWqPHWwCCmrZ8YiHg6ihpKXJ50mo=; b=NgxF4gU2HVQ6sAVmi4965wK2B88xmN3crLpPWja4f7CgngZBMmrCtlTL63B51PbE87fuIe /uvao1MpQezQps0jXvsDDn/BphPrKdrE/qKZj1AQcEF7XBs1ZrAwvue/xB9B4pSYQuRoBu 1HHZavtwvXVO/JxgHZ43610Df8q3l6o= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-632-AxXsMPpDOq-T4UcjVla0lQ-1; Thu, 07 May 2026 07:53:50 -0400 X-MC-Unique: AxXsMPpDOq-T4UcjVla0lQ-1 X-Mimecast-MFC-AGG-ID: AxXsMPpDOq-T4UcjVla0lQ_1778154828 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3CD76195609D; Thu, 7 May 2026 11:53:48 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0966D1953947; Thu, 7 May 2026 11:53:44 +0000 (UTC) From: Albert Esteve Date: Thu, 07 May 2026 13:53:07 +0200 Subject: [PATCH 09/10] drm/panel/startek-kd070fhfid015: Use refcounted allocation in place of devm_kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260507-drm_panel_init_rm-v1-9-51f448c7c291@redhat.com> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> In-Reply-To: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Albert Esteve X-Developer-Signature: v=1; a=ed25519-sha256; t=1778154793; l=1377; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=25oj7wjq/dxs/D21yMpSRSGXUTrYGO1ffOyXaGNA6ls=; b=6lE+d4kG1AnLnvBtT7IMsQTkuVhLMVLJygKHvXoG1l8CkWcS3ZC7pBXJvIgPjDz2DUFwXGzcK yxo6WOXPaxxAiako+7ElQ34xUON3JGdXVpH+mtY9aYPeM3ro1ATg9ii X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Move to using the new API devm_drm_panel_alloc() to allocate the panel. In the call to the new API, avoid using explicit type and use __typeof() for more type safety. Signed-off-by: Albert Esteve --- drivers/gpu/drm/panel/panel-startek-kd070fhfid015.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-startek-kd070fhfid015.c b/drivers/gpu/drm/panel/panel-startek-kd070fhfid015.c index c0c95355b7435..7f04b7b404e7d 100644 --- a/drivers/gpu/drm/panel/panel-startek-kd070fhfid015.c +++ b/drivers/gpu/drm/panel/panel-startek-kd070fhfid015.c @@ -286,9 +286,6 @@ static int stk_panel_add(struct stk_panel *stk) return ret; } - drm_panel_init(&stk->base, &stk->dsi->dev, &stk_panel_funcs, - DRM_MODE_CONNECTOR_DSI); - drm_panel_add(&stk->base); return 0; @@ -303,9 +300,12 @@ static int stk_panel_probe(struct mipi_dsi_device *dsi) dsi->format = MIPI_DSI_FMT_RGB888; dsi->mode_flags = (MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_LPM); - stk = devm_kzalloc(&dsi->dev, sizeof(*stk), GFP_KERNEL); - if (!stk) - return -ENOMEM; + stk = devm_drm_panel_alloc(&dsi->dev, __typeof(*stk), base, + &stk_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + + if (IS_ERR(stk)) + return PTR_ERR(stk); mipi_dsi_set_drvdata(dsi, stk); -- 2.53.0