aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/backlight.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/backlight.c')
-rw-r--r--drivers/video/backlight/backlight.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index bf5b1ece7160..297db2fa91f5 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -5,6 +5,8 @@
5 * 5 *
6 */ 6 */
7 7
8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
9
8#include <linux/module.h> 10#include <linux/module.h>
9#include <linux/init.h> 11#include <linux/init.h>
10#include <linux/device.h> 12#include <linux/device.h>
@@ -123,7 +125,7 @@ static ssize_t backlight_store_power(struct device *dev,
123 rc = -ENXIO; 125 rc = -ENXIO;
124 mutex_lock(&bd->ops_lock); 126 mutex_lock(&bd->ops_lock);
125 if (bd->ops) { 127 if (bd->ops) {
126 pr_debug("backlight: set power to %lu\n", power); 128 pr_debug("set power to %lu\n", power);
127 if (bd->props.power != power) { 129 if (bd->props.power != power) {
128 bd->props.power = power; 130 bd->props.power = power;
129 backlight_update_status(bd); 131 backlight_update_status(bd);
@@ -161,8 +163,7 @@ static ssize_t backlight_store_brightness(struct device *dev,
161 if (brightness > bd->props.max_brightness) 163 if (brightness > bd->props.max_brightness)
162 rc = -EINVAL; 164 rc = -EINVAL;
163 else { 165 else {
164 pr_debug("backlight: set brightness to %lu\n", 166 pr_debug("set brightness to %lu\n", brightness);
165 brightness);
166 bd->props.brightness = brightness; 167 bd->props.brightness = brightness;
167 backlight_update_status(bd); 168 backlight_update_status(bd);
168 rc = count; 169 rc = count;
@@ -378,8 +379,8 @@ static int __init backlight_class_init(void)
378{ 379{
379 backlight_class = class_create(THIS_MODULE, "backlight"); 380 backlight_class = class_create(THIS_MODULE, "backlight");
380 if (IS_ERR(backlight_class)) { 381 if (IS_ERR(backlight_class)) {
381 printk(KERN_WARNING "Unable to create backlight class; errno = %ld\n", 382 pr_warn("Unable to create backlight class; errno = %ld\n",
382 PTR_ERR(backlight_class)); 383 PTR_ERR(backlight_class));
383 return PTR_ERR(backlight_class); 384 return PTR_ERR(backlight_class);
384 } 385 }
385 386