From nobody Fri Dec 19 20:12:09 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AB2242987BF; Sun, 24 Mar 2024 23:52:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324359; cv=none; b=suz6THGIAoXoFACgtJuNWEdKPhShRgdL6lU66++QYLBt3dvrG7GQy/gEgjG0whp1huY2ZfpCZ1YIPjxpqLBd9wZkYizQN1NXf9If9A1rNP7NbQgl50aSl8SxSc6J2HvNlb5GcPIeDE2abm3oSipdLlyGBKVoLhxC6+dGPlY1/TA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324359; c=relaxed/simple; bh=pqyp1rLzShpKc3h8gFSRMG675w0hHlyHiwuFd+JlXfE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZG0grstI3xJhCS6AP6vCYDdSXtm/ZellzsF0B+agWCXbgAN8jQ7ExhVdITUenm2V1L/qrySQ72oe/5apPvk0L6tH0RYmaGTcoy80qYQR5sxcPEwV8Aj5gyAnyC7zQ4rZjuHXTS6UdN7bxEDxpk3S86vw406j999rfZzLWabG2MA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fGLToHXB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fGLToHXB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1E91C433B1; Sun, 24 Mar 2024 23:52:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711324358; bh=pqyp1rLzShpKc3h8gFSRMG675w0hHlyHiwuFd+JlXfE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fGLToHXBj3OtmUelwRyz2YNH9KWLMpzz8bD8AqTKT7383lXsUvKTusZjAL+KqZrlq WbGnincBbSvuQ/r6nHZI2VOcErAC3MNepF9QommLPuB4XxE+v8ca93yP1PYWMYYMko Fw7Ovqy+hFtr8Jixf8ou6hU0BcBI9LrcZ3bHQ1JKVs8R0hgN+o8piIbIb+PJdDvt/n ViXCBlPJ+l7lAC5eMjc0aV0d6sA3FdrbeAnx0D2H0ZsDGdkUz+xv2cWcjou/yytDry o4Dmgz3Qsi1wa8EpgkB+tXasTHun6KNrnzALqMnywK3vJtFuCIp/O+7vY+kDj4l/1V N6wr5L6hsch3Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Thomas Zimmermann , Jani Nikula , Michael Ellerman , Sasha Levin Subject: [PATCH 4.19 126/148] arch/powerpc: Remove from backlight code Date: Sun, 24 Mar 2024 19:49:50 -0400 Message-ID: <20240324235012.1356413-127-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324235012.1356413-1-sashal@kernel.org> References: <20240324235012.1356413-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Thomas Zimmermann [ Upstream commit 838f865802b9f26135ea7df4e30f89ac2f50c23e ] Replace with a forward declaration in to resolve an unnecessary dependency. Remove pmac_backlight_curve_lookup() and struct fb_info from source and header files. The function and the framebuffer struct are unused. No functional changes. v3: * Add Fixes tag (Christophe) * fix typos in commit message (Jani) Signed-off-by: Thomas Zimmermann Fixes: d565dd3b0824 ("[PATCH] powerpc: More via-pmu backlight fixes") Reviewed-by: Jani Nikula Acked-by: Michael Ellerman # (powerpc) Link: https://patchwork.freedesktop.org/patch/msgid/20240306122935.10626-4-= tzimmermann@suse.de Signed-off-by: Sasha Levin --- arch/powerpc/include/asm/backlight.h | 5 ++-- arch/powerpc/platforms/powermac/backlight.c | 26 --------------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/arch/powerpc/include/asm/backlight.h b/arch/powerpc/include/as= m/backlight.h index 1b5eab62ed047..061a910d74929 100644 --- a/arch/powerpc/include/asm/backlight.h +++ b/arch/powerpc/include/asm/backlight.h @@ -10,15 +10,14 @@ #define __ASM_POWERPC_BACKLIGHT_H #ifdef __KERNEL__ =20 -#include #include =20 +struct backlight_device; + /* For locking instructions, see the implementation file */ extern struct backlight_device *pmac_backlight; extern struct mutex pmac_backlight_mutex; =20 -extern int pmac_backlight_curve_lookup(struct fb_info *info, int value); - extern int pmac_has_backlight_type(const char *type); =20 extern void pmac_backlight_key(int direction); diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/pla= tforms/powermac/backlight.c index 6b5dcccae1d30..8fae9a7d3d47c 100644 --- a/arch/powerpc/platforms/powermac/backlight.c +++ b/arch/powerpc/platforms/powermac/backlight.c @@ -8,7 +8,6 @@ */ =20 #include -#include #include #include #include @@ -72,31 +71,6 @@ int pmac_has_backlight_type(const char *type) return 0; } =20 -int pmac_backlight_curve_lookup(struct fb_info *info, int value) -{ - int level =3D (FB_BACKLIGHT_LEVELS - 1); - - if (info && info->bl_dev) { - int i, max =3D 0; - - /* Look for biggest value */ - for (i =3D 0; i < FB_BACKLIGHT_LEVELS; i++) - max =3D max((int)info->bl_curve[i], max); - - /* Look for nearest value */ - for (i =3D 0; i < FB_BACKLIGHT_LEVELS; i++) { - int diff =3D abs(info->bl_curve[i] - value); - if (diff < max) { - max =3D diff; - level =3D i; - } - } - - } - - return level; -} - static void pmac_backlight_key_worker(struct work_struct *work) { if (atomic_read(&kernel_backlight_disabled)) --=20 2.43.0