diff options
Diffstat (limited to 'drivers/video/backlight/apple_bl.c')
-rw-r--r-- | drivers/video/backlight/apple_bl.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/video/backlight/apple_bl.c b/drivers/video/backlight/apple_bl.c index ef5ca0d6cd20..9dc73ac3709a 100644 --- a/drivers/video/backlight/apple_bl.c +++ b/drivers/video/backlight/apple_bl.c | |||
@@ -16,6 +16,8 @@ | |||
16 | * get at the firmware code in order to figure out what it's actually doing. | 16 | * get at the firmware code in order to figure out what it's actually doing. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
20 | |||
19 | #include <linux/module.h> | 21 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 23 | #include <linux/init.h> |
@@ -40,8 +42,6 @@ struct hw_data { | |||
40 | 42 | ||
41 | static const struct hw_data *hw_data; | 43 | static const struct hw_data *hw_data; |
42 | 44 | ||
43 | #define DRIVER "apple_backlight: " | ||
44 | |||
45 | /* Module parameters. */ | 45 | /* Module parameters. */ |
46 | static int debug; | 46 | static int debug; |
47 | module_param_named(debug, debug, int, 0644); | 47 | module_param_named(debug, debug, int, 0644); |
@@ -61,8 +61,7 @@ static int intel_chipset_send_intensity(struct backlight_device *bd) | |||
61 | int intensity = bd->props.brightness; | 61 | int intensity = bd->props.brightness; |
62 | 62 | ||
63 | if (debug) | 63 | if (debug) |
64 | printk(KERN_DEBUG DRIVER "setting brightness to %d\n", | 64 | pr_debug("setting brightness to %d\n", intensity); |
65 | intensity); | ||
66 | 65 | ||
67 | intel_chipset_set_brightness(intensity); | 66 | intel_chipset_set_brightness(intensity); |
68 | return 0; | 67 | return 0; |
@@ -77,8 +76,7 @@ static int intel_chipset_get_intensity(struct backlight_device *bd) | |||
77 | intensity = inb(0xb3) >> 4; | 76 | intensity = inb(0xb3) >> 4; |
78 | 77 | ||
79 | if (debug) | 78 | if (debug) |
80 | printk(KERN_DEBUG DRIVER "read brightness of %d\n", | 79 | pr_debug("read brightness of %d\n", intensity); |
81 | intensity); | ||
82 | 80 | ||
83 | return intensity; | 81 | return intensity; |
84 | } | 82 | } |
@@ -108,8 +106,7 @@ static int nvidia_chipset_send_intensity(struct backlight_device *bd) | |||
108 | int intensity = bd->props.brightness; | 106 | int intensity = bd->props.brightness; |
109 | 107 | ||
110 | if (debug) | 108 | if (debug) |
111 | printk(KERN_DEBUG DRIVER "setting brightness to %d\n", | 109 | pr_debug("setting brightness to %d\n", intensity); |
112 | intensity); | ||
113 | 110 | ||
114 | nvidia_chipset_set_brightness(intensity); | 111 | nvidia_chipset_set_brightness(intensity); |
115 | return 0; | 112 | return 0; |
@@ -124,8 +121,7 @@ static int nvidia_chipset_get_intensity(struct backlight_device *bd) | |||
124 | intensity = inb(0x52f) >> 4; | 121 | intensity = inb(0x52f) >> 4; |
125 | 122 | ||
126 | if (debug) | 123 | if (debug) |
127 | printk(KERN_DEBUG DRIVER "read brightness of %d\n", | 124 | pr_debug("read brightness of %d\n", intensity); |
128 | intensity); | ||
129 | 125 | ||
130 | return intensity; | 126 | return intensity; |
131 | } | 127 | } |
@@ -150,7 +146,7 @@ static int __devinit apple_bl_add(struct acpi_device *dev) | |||
150 | host = pci_get_bus_and_slot(0, 0); | 146 | host = pci_get_bus_and_slot(0, 0); |
151 | 147 | ||
152 | if (!host) { | 148 | if (!host) { |
153 | printk(KERN_ERR DRIVER "unable to find PCI host\n"); | 149 | pr_err("unable to find PCI host\n"); |
154 | return -ENODEV; | 150 | return -ENODEV; |
155 | } | 151 | } |
156 | 152 | ||
@@ -162,7 +158,7 @@ static int __devinit apple_bl_add(struct acpi_device *dev) | |||
162 | pci_dev_put(host); | 158 | pci_dev_put(host); |
163 | 159 | ||
164 | if (!hw_data) { | 160 | if (!hw_data) { |
165 | printk(KERN_ERR DRIVER "unknown hardware\n"); | 161 | pr_err("unknown hardware\n"); |
166 | return -ENODEV; | 162 | return -ENODEV; |
167 | } | 163 | } |
168 | 164 | ||