Skip to contentSkip to conversation

backlight: generic_bl: Remove unused function

PATCH Applied Fabio Estevam 2 participants 2 messages Aug 27, 2014 – Aug 28, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backlight: generic_bl: Remove unused function

From: Fabio Estevam <[email protected]>

genericbl_limit_intensity() is exported, but it is never called anywhere else.

Fix the following sparse warning:

drivers/video/backlight/generic_bl.c:59:6: warning: symbol 'genericbl_limit_intensity' was not declared. Should it be static?

---
 drivers/video/backlight/generic_bl.c | 18 ------------------
 1 file changed, 18 deletions(-)
drivers/video/backlight/generic_bl.c +0 -18
index 5d8d652..67dfb93 100644
@@ -52,24 +52,6 @@ static int genericbl_get_intensity(struct backlight_device *bd)
 	return genericbl_intensity;
 }
 
-/*
- * Called when the battery is low to limit the backlight intensity.
- * If limit=0 clear any limit, otherwise limit the intensity
- */
-void genericbl_limit_intensity(int limit)
-{
-	struct backlight_device *bd = generic_backlight_device;
-
-	mutex_lock(&bd->ops_lock);
-	if (limit)
-		bd->props.state |= GENERICBL_BATTLOW;
-	else
-		bd->props.state &= ~GENERICBL_BATTLOW;
-	backlight_update_status(generic_backlight_device);
-	mutex_unlock(&bd->ops_lock);
-}
-EXPORT_SYMBOL(genericbl_limit_intensity);
-
 static const struct backlight_ops genericbl_ops = {
 	.options = BL_CORE_SUSPENDRESUME,
 	.get_brightness = genericbl_get_intensity,
Signature · 1 line
1.9.1
Applied
#1 lore raw
Quoted 5 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

genericbl_limit_intensity() is exported, but it is never called anywhere else.

Quoted 8 lines

Fix the following sparse warning:

drivers/video/backlight/generic_bl.c:59:6: warning: symbol 'genericbl_limit_intensity' was not declared. Should it be static?

---
 drivers/video/backlight/generic_bl.c | 18 ------------------
 1 file changed, 18 deletions(-)

Applied, thanks.

Quoted 29 lines
drivers/video/backlight/generic_bl.c +0 -18
index 5d8d652..67dfb93 100644
@@ -52,24 +52,6 @@ static int genericbl_get_intensity(struct backlight_device *bd)
 	return genericbl_intensity;
 }
 
-/*
- * Called when the battery is low to limit the backlight intensity.
- * If limit=0 clear any limit, otherwise limit the intensity
- */
-void genericbl_limit_intensity(int limit)
-{
-	struct backlight_device *bd = generic_backlight_device;
-
-	mutex_lock(&bd->ops_lock);
-	if (limit)
-		bd->props.state |= GENERICBL_BATTLOW;
-	else
-		bd->props.state &= ~GENERICBL_BATTLOW;
-	backlight_update_status(generic_backlight_device);
-	mutex_unlock(&bd->ops_lock);
-}
-EXPORT_SYMBOL(genericbl_limit_intensity);
-
 static const struct backlight_ops genericbl_ops = {
 	.options = BL_CORE_SUSPENDRESUME,
 	.get_brightness = genericbl_get_intensity,
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog