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 0BA41382F26 for ; Fri, 8 May 2026 07:05:34 +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=1778223937; cv=none; b=kntOkMF+A/xaZCnjHHDyTiCg67T0zCiYLdApXOXV6CzjWkiiMD+fOP8jw0PVFfT9KwOXQdNi1H1tPFakRtv9O/VcyEBvmt8glFDcYx/pkvc3mpn3ihudQPvFpX+fIhhTgtizzgw9W+rxDw3BdXMiV2Z6tAK6HVvBmv/Gn6tiX5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778223937; c=relaxed/simple; bh=OQllEoVO7xGt0UI+IRwd1Doh/tPenWnP6xg6RG0380E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WYiR7vhTTDhzKeBhn3Lu6Z3oCCypySU3d3RJayAs11pJYi35pJY5zXiu0OpmNgGaPJqb3Ahx7MjUPuWe8uiTv4EaE2LWYenO737jQnsd5rlBwDUDxo1nbEpVfbKNnP4uoKB44MYx6dVZA74FwjcbGanjBIeBJoEW5jl9H6blh20= 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=anExfyzY; 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="anExfyzY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778223933; 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=2qKmDXANM4fAJMbfll/+yceF4Qy9R+jWVzBRPdI1AFA=; b=anExfyzYtwnpk3uxqcDkZkmDwAR45bsc3MM2TWk/PfkAAItVEBy3PPO4Wsea7kWWBxim07 zc2OToDyH+ndKsnQRglgS+jXWk7NLgaX0xKtrBCT9IlIwulfjQdNUgzI91PGa2Z+KA63GZ PB+6WabHDTAKQz+Tumhi3DxoD4or5VQ= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-qagchn4rNEGGl_URuSjgNg-1; Fri, 08 May 2026 03:05:27 -0400 X-MC-Unique: qagchn4rNEGGl_URuSjgNg-1 X-Mimecast-MFC-AGG-ID: qagchn4rNEGGl_URuSjgNg_1778223925 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8D23118005B5; Fri, 8 May 2026 07:05:25 +0000 (UTC) Received: from [192.168.1.153] (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AEF58300019F; Fri, 8 May 2026 07:05:22 +0000 (UTC) From: Albert Esteve Date: Fri, 08 May 2026 09:04:50 +0200 Subject: [PATCH v2 10/10] drm/panel: Make drm_panel_init() static 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: <20260508-drm_panel_init_rm-v2-10-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@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=1778223888; l=3277; i=aesteve@redhat.com; s=20260303; h=from:subject:message-id; bh=OQllEoVO7xGt0UI+IRwd1Doh/tPenWnP6xg6RG0380E=; b=oL5k4LJGRJZ7Euwp/lmy7oKzWo+xiz1OpIjnuSHx59iNmL0kyGICvsdG7m821R23neXU1DauI n6M/GxfZLviCp7hS22nTxAe+NPtuQXX8S1wsOHy88yax7MrqJn72UkD X-Developer-Key: i=aesteve@redhat.com; a=ed25519; pk=YSFz6sOHd2L45+Fr8DIvHTi6lSIjhLZ5T+rkxspJt1s= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Now that all panel drivers use devm_drm_panel_alloc(), there are no external callers of drm_panel_init(). Make it static to prevent new users from bypassing the refcounted allocation path. Remove stale references to drm_panel_init() in kdocs. Reviewed-by: Maxime Ripard Signed-off-by: Albert Esteve --- drivers/gpu/drm/display/drm_dp_helper.c | 2 -- drivers/gpu/drm/drm_panel.c | 7 +++---- include/drm/drm_panel.h | 4 ---- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c index a697cc227e289..6d5556e3c134c 100644 --- a/drivers/gpu/drm/display/drm_dp_helper.c +++ b/drivers/gpu/drm/display/drm_dp_helper.c @@ -4626,8 +4626,6 @@ static const struct backlight_ops dp_aux_bl_ops = { * Backlight will then be handled transparently without requiring * any intervention from the driver. * - * drm_panel_dp_aux_backlight() must be called after the call to drm_panel_init(). - * * Return: 0 on success or a negative error code on failure. */ int drm_panel_dp_aux_backlight(struct drm_panel *panel, struct drm_dp_aux *aux) diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index d1e6598ea3bc0..9c3cbc7aea2c3 100644 --- a/drivers/gpu/drm/drm_panel.c +++ b/drivers/gpu/drm/drm_panel.c @@ -56,8 +56,9 @@ static LIST_HEAD(panel_list); * Initialize the panel structure for subsequent registration with * drm_panel_add(). */ -void drm_panel_init(struct drm_panel *panel, struct device *dev, - const struct drm_panel_funcs *funcs, int connector_type) +static void drm_panel_init(struct drm_panel *panel, struct device *dev, + const struct drm_panel_funcs *funcs, + int connector_type) { if (connector_type == DRM_MODE_CONNECTOR_Unknown) DRM_WARN("%s: %s: a valid connector type is required!\n", __func__, dev_name(dev)); @@ -69,7 +70,6 @@ void drm_panel_init(struct drm_panel *panel, struct device *dev, panel->funcs = funcs; panel->connector_type = connector_type; } -EXPORT_SYMBOL(drm_panel_init); /** * drm_panel_add - add a panel to the global registry @@ -708,7 +708,6 @@ EXPORT_SYMBOL(devm_drm_panel_add_follower); * A typical implementation for a panel driver supporting device tree * will call this function at probe time. Backlight will then be handled * transparently without requiring any intervention from the driver. - * drm_panel_of_backlight() must be called after the call to drm_panel_init(). * * Return: 0 on success or a negative error code on failure. */ diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 2407bfa60236f..55cbc51512240 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -320,10 +320,6 @@ void *__devm_drm_panel_alloc(struct device *dev, size_t size, size_t offset, offsetof(type, member), funcs, \ connector_type)) -void drm_panel_init(struct drm_panel *panel, struct device *dev, - const struct drm_panel_funcs *funcs, - int connector_type); - struct drm_panel *drm_panel_get(struct drm_panel *panel); void drm_panel_put(struct drm_panel *panel); -- 2.53.0