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 0ACD4156678 for ; Fri, 30 May 2025 02:51:27 +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=1748573489; cv=none; b=dBwdMapmI4hOAl7/aoE75IGN3eVAuc2gyOlLxvCuT2N8gVvI1AdqQ2gbS5yXEqrqhY7OfHvctcs8mUhX/OHxuG0FCk4KjOUn24Kv6OJCh75++Ygl9J6jC5yat9GcrC6frSxqPg0KMpMudPiYKzMfVL80OpcPsH9jVhscnewq+t8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748573489; c=relaxed/simple; bh=tWkBmw56eLvccRAWDdn/uZeOgH1OOvL1G8S7xFfK8ow=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OBHV4/QzndALBMNSx+RQtoUNVbR8VIIwHGu4BhYAKyIHcSwzhwxThx5ZBvX+/lPDu1o5FsGgKtEYDvAWeZcDbj/e9gHrDV1Z7k6h1KDESyZM5RXr+yD5OwNheD2zHWCD3nVAY45zpv5LtcwD++S5IY4YmMqkYerjCo7SJCNvf/I= 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=ES9iN+T8; 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="ES9iN+T8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748573487; 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=EaaS2F57uiM4VddV5yn2phRlX6A1b1O+GF2/UqnOVuw=; b=ES9iN+T8h76fh8g0kw7KrxV3RFwoYE/BGsFcyazGOcsaYmlvlFtbbeemYwmILWVCkqjHa5 j5GL0ugkXbS0rxe3UOV2wwYjz6CsR4BcuxCTHLfRexWf/xjkM2z0FeVzPzJViVqemaDVHV Ki66zkmkh95DoMSwn2GF+r3UZex7Kac= Received: from mx-prod-mc-04.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-510-GVmcWfu4Mh-ZUFV98MFU3g-1; Thu, 29 May 2025 22:51:23 -0400 X-MC-Unique: GVmcWfu4Mh-ZUFV98MFU3g-1 X-Mimecast-MFC-AGG-ID: GVmcWfu4Mh-ZUFV98MFU3g_1748573480 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 775341955DB0; Fri, 30 May 2025 02:51:20 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.17.97]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BC1561955D82; Fri, 30 May 2025 02:51:15 +0000 (UTC) From: Anusha Srivatsa Date: Thu, 29 May 2025 21:46:20 -0500 Subject: [PATCH v2 18/46] panel/samsung-s6e3ha8: 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: <20250529-b4-drm_panel_mass_driver_convert_part3-v2-18-5d75a3711e40@redhat.com> References: <20250529-b4-drm_panel_mass_driver_convert_part3-v2-0-5d75a3711e40@redhat.com> In-Reply-To: <20250529-b4-drm_panel_mass_driver_convert_part3-v2-0-5d75a3711e40@redhat.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Robert Chiras , Linus Walleij , Markuss Broks , Artur Weber , Dzmitry Sankouski , Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Ondrej Jirman , Sasha Finkelstein , Janne Grunau , Michael Trimarchi , Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1748573168; l=1573; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=tWkBmw56eLvccRAWDdn/uZeOgH1OOvL1G8S7xFfK8ow=; b=fy9861bvzxOm8O39bLZ0+W6eadeocbtXCC9yyRptEsIleVKFAXJOKDJ23EYk3Yk1LM9IFmMLU sDvymU2cByGCWCn1got/Ah4+UEJ9KJjyUrmPfKFyut1Q+g3DrRFn2c0 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Move to using the new API devm_drm_panel_alloc() to allocate the panel. Reviewed-by: Neil Armstrong Signed-off-by: Anusha Srivatsa --- v2: none --- drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c index 64c6f7d45bed3d77215666d05619a55f1220bf45..550e9ef9bb71b53a327ae9de8e0e4c3b458937d6 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c @@ -253,9 +253,11 @@ static int s6e3ha8_amb577px01_wqhd_probe(struct mipi_dsi_device *dsi) struct s6e3ha8 *priv; int ret; - priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); - if (!priv) - return -ENOMEM; + priv = devm_drm_panel_alloc(dev, struct s6e3ha8, panel, + &s6e3ha8_amb577px01_wqhd_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(priv)) + return PTR_ERR(priv); ret = devm_regulator_bulk_get_const(dev, ARRAY_SIZE(s6e3ha8_supplies), s6e3ha8_supplies, @@ -279,8 +281,6 @@ static int s6e3ha8_amb577px01_wqhd_probe(struct mipi_dsi_device *dsi) MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP | MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET; - drm_panel_init(&priv->panel, dev, &s6e3ha8_amb577px01_wqhd_panel_funcs, - DRM_MODE_CONNECTOR_DSI); priv->panel.prepare_prev_first = true; drm_panel_add(&priv->panel); -- 2.48.1