Skip to contentSkip to conversation

drivers: video: Remove unused function genericbl_limit_intensity() in generic_bl.c

PATCH In review Rashika Kheria 3 participants 4 messages Dec 16, 2013 – Dec 27, 2013

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

PATCH 1/1 drivers: video: Remove unused function genericbl_limit_intensity() in generic_bl.c

Removes unused function genericbl_limit_intensity() in backlight/generic_bl.c.

This eliminates the following warning in backlight/generic_bl.c:
drivers/video/backlight/generic_bl.c:59:6: warning: no previous prototype for ‘genericbl_limit_intensity’ [-Wmissing-prototypes]

---
 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.7.9.5
#1 lore raw
Quoted 7 lines · Rashika Kheria

Removes unused function genericbl_limit_intensity() in backlight/generic_bl.c.

This eliminates the following warning in backlight/generic_bl.c:
drivers/video/backlight/generic_bl.c:59:6: warning: no previous prototype for ‘genericbl_limit_intensity’ [-Wmissing-prototypes]

Hi Eric,

Originally, genericbl_limit_intensity() was added by you. (commit: bfdcaa3 "lcd: add corgibl_limit_intensity() to corgi_lcd")

Currently, genericbl_limit_intensity() is not called anywhere in mainline kernel. Can we remove this genericbl_limit_intensity()?

Best regards,
Jingoo Han

Quoted 37 lines
---
 drivers/video/backlight/generic_bl.c |   18 ------------------
 1 file changed, 18 deletions(-)
drivers/video/backlight/generic_bl.c +0 -19
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,
--

1.7.9.5

Reviewed-by on v1 1/1
#2 lore raw
In reply to Rashika Kheria
Quoted 7 lines · Rashika Kheria

Removes unused function genericbl_limit_intensity() in backlight/generic_bl.c.

This eliminates the following warning in backlight/generic_bl.c:
drivers/video/backlight/generic_bl.c:59:6: warning: no previous prototype for ‘genericbl_limit_intensity’ [-Wmissing-prototypes]

Quoted 35 lines
 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.7.9.5
Acked-by
#3 lore raw
Quoted 11 lines · Josh Triplett
Quoted 5 lines · Rashika Kheria

Removes unused function genericbl_limit_intensity() in backlight/generic_bl.c.

This eliminates the following warning in backlight/generic_bl.c:
drivers/video/backlight/generic_bl.c:59:6: warning: no previous prototype for

‘genericbl_limit_intensity’ [-Wmissing-prototypes]

Quoted 2 lines

(+cc Andrew Morton, Eric Miao)

Best regards,
Jingoo Han

Quoted 36 lines
Quoted 36 lines
 drivers/video/backlight/generic_bl.c |   18 ------------------
 1 file changed, 18 deletions(-)
drivers/video/backlight/generic_bl.c +0 -19
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,
--

1.7.9.5