aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-03-29 18:21:45 -0400
committerMatthew Garrett <mjg@redhat.com>2011-05-27 12:35:50 -0400
commit9a2ffd168ef8ec3705060ffb21d6dcb20eeb9506 (patch)
tree04e236286c6b4d549c34fc7cf26f5a87f12595c2 /drivers
parent4686f6df69c5bca5ea795e01048d32f6eed07ba7 (diff)
intel_pmic_gpio: Convert printks to pr_<level>
Add #define pr_fmt(fmt) "%s: " fmt, __func__ to prefix function name to each output message. Convert printks to pr_<level>. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/intel_pmic_gpio.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/platform/x86/intel_pmic_gpio.c b/drivers/platform/x86/intel_pmic_gpio.c
index 464bb3fc4d88..1686c1e07d5d 100644
--- a/drivers/platform/x86/intel_pmic_gpio.c
+++ b/drivers/platform/x86/intel_pmic_gpio.c
@@ -19,6 +19,8 @@
19 * Moorestown platform PMIC chip 19 * Moorestown platform PMIC chip
20 */ 20 */
21 21
22#define pr_fmt(fmt) "%s: " fmt, __func__
23
22#include <linux/module.h> 24#include <linux/module.h>
23#include <linux/kernel.h> 25#include <linux/kernel.h>
24#include <linux/interrupt.h> 26#include <linux/interrupt.h>
@@ -90,8 +92,7 @@ static void pmic_program_irqtype(int gpio, int type)
90static int pmic_gpio_direction_input(struct gpio_chip *chip, unsigned offset) 92static int pmic_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
91{ 93{
92 if (offset > 8) { 94 if (offset > 8) {
93 printk(KERN_ERR 95 pr_err("only pin 0-7 support input\n");
94 "%s: only pin 0-7 support input\n", __func__);
95 return -1;/* we only have 8 GPIO can use as input */ 96 return -1;/* we only have 8 GPIO can use as input */
96 } 97 }
97 return intel_scu_ipc_update_register(GPIO0 + offset, 98 return intel_scu_ipc_update_register(GPIO0 + offset,
@@ -116,8 +117,7 @@ static int pmic_gpio_direction_output(struct gpio_chip *chip,
116 value ? 1 << (offset - 16) : 0, 117 value ? 1 << (offset - 16) : 0,
117 1 << (offset - 16)); 118 1 << (offset - 16));
118 else { 119 else {
119 printk(KERN_ERR 120 pr_err("invalid PMIC GPIO pin %d!\n", offset);
120 "%s: invalid PMIC GPIO pin %d!\n", __func__, offset);
121 WARN_ON(1); 121 WARN_ON(1);
122 } 122 }
123 123
@@ -260,7 +260,7 @@ static int __devinit platform_pmic_gpio_probe(struct platform_device *pdev)
260 /* setting up SRAM mapping for GPIOINT register */ 260 /* setting up SRAM mapping for GPIOINT register */
261 pg->gpiointr = ioremap_nocache(pdata->gpiointr, 8); 261 pg->gpiointr = ioremap_nocache(pdata->gpiointr, 8);
262 if (!pg->gpiointr) { 262 if (!pg->gpiointr) {
263 printk(KERN_ERR "%s: Can not map GPIOINT.\n", __func__); 263 pr_err("Can not map GPIOINT\n");
264 retval = -EINVAL; 264 retval = -EINVAL;
265 goto err2; 265 goto err2;
266 } 266 }
@@ -281,13 +281,13 @@ static int __devinit platform_pmic_gpio_probe(struct platform_device *pdev)
281 pg->chip.dev = dev; 281 pg->chip.dev = dev;
282 retval = gpiochip_add(&pg->chip); 282 retval = gpiochip_add(&pg->chip);
283 if (retval) { 283 if (retval) {
284 printk(KERN_ERR "%s: Can not add pmic gpio chip.\n", __func__); 284 pr_err("Can not add pmic gpio chip\n");
285 goto err; 285 goto err;
286 } 286 }
287 287
288 retval = request_irq(pg->irq, pmic_irq_handler, 0, "pmic", pg); 288 retval = request_irq(pg->irq, pmic_irq_handler, 0, "pmic", pg);
289 if (retval) { 289 if (retval) {
290 printk(KERN_WARNING "pmic: Interrupt request failed\n"); 290 pr_warn("Interrupt request failed\n");
291 goto err; 291 goto err;
292 } 292 }
293 293