summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-sunfire.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 09:29:02 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 09:29:02 -0800
commit0512c04a2b5d29a33d96d315e1d14c55f5148aa7 (patch)
tree6373c0370abe32e1e42a933bd9cd08727e48b5d9 /drivers/leds/leds-sunfire.c
parent5115f3c19d17851aaff5a857f55b4a019c908775 (diff)
parent4b07c5d5123f76487c61cf9dc3f987d0b8c88a94 (diff)
downloadop-kernel-dev-0512c04a2b5d29a33d96d315e1d14c55f5148aa7.zip
op-kernel-dev-0512c04a2b5d29a33d96d315e1d14c55f5148aa7.tar.gz
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem update from Bryan Wu. * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (61 commits) leds: leds-sunfire: use dev_err()/pr_err() instead of printk() leds: 88pm860x: Add missing of_node_put() leds: tca6507: Use of_get_child_count() leds: leds-pwm: make it depend on PWM and not HAVE_PWM Documentation: leds: update LP55xx family devices leds-lp55xx: fix problem on removing LED attributes leds-lp5521/5523: add author and copyright description leds-lp5521/5523: use new lp55xx common header leds-lp55xx: clean up headers leds-lp55xx: clean up definitions leds-lp55xx: clean up unused data and functions leds-lp55xx: clean up _remove() leds-lp55xx: add new function for removing device attribtues leds-lp55xx: code refactoring on selftest function leds-lp55xx: use common device attribute driver function leds-lp55xx: support device specific attributes leds-lp5523: use generic firmware interface leds-lp5521: use generic firmware interface leds-lp55xx: support firmware interface leds-lp55xx: add new lp55xx_register_sysfs() for the firmware interface ...
Diffstat (limited to 'drivers/leds/leds-sunfire.c')
-rw-r--r--drivers/leds/leds-sunfire.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/leds/leds-sunfire.c b/drivers/leds/leds-sunfire.c
index 07ff5a3..8979299 100644
--- a/drivers/leds/leds-sunfire.c
+++ b/drivers/leds/leds-sunfire.c
@@ -3,6 +3,8 @@
* Copyright (C) 2008 David S. Miller <davem@davemloft.net>
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
@@ -14,9 +16,6 @@
#include <asm/fhc.h>
#include <asm/upa.h>
-#define DRIVER_NAME "leds-sunfire"
-#define PFX DRIVER_NAME ": "
-
MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
MODULE_DESCRIPTION("Sun Fire LED driver");
MODULE_LICENSE("GPL");
@@ -130,14 +129,14 @@ static int sunfire_led_generic_probe(struct platform_device *pdev,
int i, err;
if (pdev->num_resources != 1) {
- printk(KERN_ERR PFX "Wrong number of resources %d, should be 1\n",
+ dev_err(&pdev->dev, "Wrong number of resources %d, should be 1\n",
pdev->num_resources);
return -EINVAL;
}
p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL);
if (!p) {
- printk(KERN_ERR PFX "Could not allocate struct sunfire_drvdata\n");
+ dev_err(&pdev->dev, "Could not allocate struct sunfire_drvdata\n");
return -ENOMEM;
}
@@ -152,7 +151,7 @@ static int sunfire_led_generic_probe(struct platform_device *pdev,
err = led_classdev_register(&pdev->dev, lp);
if (err) {
- printk(KERN_ERR PFX "Could not register %s LED\n",
+ dev_err(&pdev->dev, "Could not register %s LED\n",
lp->name);
for (i--; i >= 0; i--)
led_classdev_unregister(&p->leds[i].led_cdev);
@@ -188,7 +187,7 @@ static struct led_type clockboard_led_types[NUM_LEDS_PER_BOARD] = {
{
.name = "clockboard-right",
.handler = clockboard_right_set,
- .default_trigger= "heartbeat",
+ .default_trigger = "heartbeat",
},
};
@@ -209,7 +208,7 @@ static struct led_type fhc_led_types[NUM_LEDS_PER_BOARD] = {
{
.name = "fhc-right",
.handler = fhc_right_set,
- .default_trigger= "heartbeat",
+ .default_trigger = "heartbeat",
},
};
@@ -244,13 +243,13 @@ static int __init sunfire_leds_init(void)
int err = platform_driver_register(&sunfire_clockboard_led_driver);
if (err) {
- printk(KERN_ERR PFX "Could not register clock board LED driver\n");
+ pr_err("Could not register clock board LED driver\n");
return err;
}
err = platform_driver_register(&sunfire_fhc_led_driver);
if (err) {
- printk(KERN_ERR PFX "Could not register FHC LED driver\n");
+ pr_err("Could not register FHC LED driver\n");
platform_driver_unregister(&sunfire_clockboard_led_driver);
}
OpenPOWER on IntegriCloud