Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308945
b: refs/heads/master
c: 7b12c1b
h: refs/heads/master
i:
  308943: 8e9cce1
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed May 29, 2012
1 parent 1e89774 commit 9026515
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35f961623cee5212d4ee0baa8c34b1766913b36b
refs/heads/master: 7b12c1b9ee6f66c12f9dc16f76474caa74dbc01f
20 changes: 8 additions & 12 deletions trunk/drivers/video/backlight/apple_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* get at the firmware code in order to figure out what it's actually doing.
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
Expand All @@ -40,8 +42,6 @@ struct hw_data {

static const struct hw_data *hw_data;

#define DRIVER "apple_backlight: "

/* Module parameters. */
static int debug;
module_param_named(debug, debug, int, 0644);
Expand All @@ -61,8 +61,7 @@ static int intel_chipset_send_intensity(struct backlight_device *bd)
int intensity = bd->props.brightness;

if (debug)
printk(KERN_DEBUG DRIVER "setting brightness to %d\n",
intensity);
pr_debug("setting brightness to %d\n", intensity);

intel_chipset_set_brightness(intensity);
return 0;
Expand All @@ -77,8 +76,7 @@ static int intel_chipset_get_intensity(struct backlight_device *bd)
intensity = inb(0xb3) >> 4;

if (debug)
printk(KERN_DEBUG DRIVER "read brightness of %d\n",
intensity);
pr_debug("read brightness of %d\n", intensity);

return intensity;
}
Expand Down Expand Up @@ -108,8 +106,7 @@ static int nvidia_chipset_send_intensity(struct backlight_device *bd)
int intensity = bd->props.brightness;

if (debug)
printk(KERN_DEBUG DRIVER "setting brightness to %d\n",
intensity);
pr_debug("setting brightness to %d\n", intensity);

nvidia_chipset_set_brightness(intensity);
return 0;
Expand All @@ -124,8 +121,7 @@ static int nvidia_chipset_get_intensity(struct backlight_device *bd)
intensity = inb(0x52f) >> 4;

if (debug)
printk(KERN_DEBUG DRIVER "read brightness of %d\n",
intensity);
pr_debug("read brightness of %d\n", intensity);

return intensity;
}
Expand All @@ -150,7 +146,7 @@ static int __devinit apple_bl_add(struct acpi_device *dev)
host = pci_get_bus_and_slot(0, 0);

if (!host) {
printk(KERN_ERR DRIVER "unable to find PCI host\n");
pr_err("unable to find PCI host\n");
return -ENODEV;
}

Expand All @@ -162,7 +158,7 @@ static int __devinit apple_bl_add(struct acpi_device *dev)
pci_dev_put(host);

if (!hw_data) {
printk(KERN_ERR DRIVER "unknown hardware\n");
pr_err("unknown hardware\n");
return -ENODEV;
}

Expand Down

0 comments on commit 9026515

Please sign in to comment.