Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Joe Perches and committed by
Matthew Garrett
9a2ffd16 4686f6df

+7 -7
+7 -7
drivers/platform/x86/intel_pmic_gpio.c
··· 19 19 * Moorestown platform PMIC chip 20 20 */ 21 21 22 + #define pr_fmt(fmt) "%s: " fmt, __func__ 23 + 22 24 #include <linux/module.h> 23 25 #include <linux/kernel.h> 24 26 #include <linux/interrupt.h> ··· 92 90 static int pmic_gpio_direction_input(struct gpio_chip *chip, unsigned offset) 93 91 { 94 92 if (offset > 8) { 95 - printk(KERN_ERR 96 - "%s: only pin 0-7 support input\n", __func__); 93 + pr_err("only pin 0-7 support input\n"); 97 94 return -1;/* we only have 8 GPIO can use as input */ 98 95 } 99 96 return intel_scu_ipc_update_register(GPIO0 + offset, ··· 117 116 value ? 1 << (offset - 16) : 0, 118 117 1 << (offset - 16)); 119 118 else { 120 - printk(KERN_ERR 121 - "%s: invalid PMIC GPIO pin %d!\n", __func__, offset); 119 + pr_err("invalid PMIC GPIO pin %d!\n", offset); 122 120 WARN_ON(1); 123 121 } 124 122 ··· 260 260 /* setting up SRAM mapping for GPIOINT register */ 261 261 pg->gpiointr = ioremap_nocache(pdata->gpiointr, 8); 262 262 if (!pg->gpiointr) { 263 - printk(KERN_ERR "%s: Can not map GPIOINT.\n", __func__); 263 + pr_err("Can not map GPIOINT\n"); 264 264 retval = -EINVAL; 265 265 goto err2; 266 266 } ··· 281 281 pg->chip.dev = dev; 282 282 retval = gpiochip_add(&pg->chip); 283 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 285 goto err; 286 286 } 287 287 288 288 retval = request_irq(pg->irq, pmic_irq_handler, 0, "pmic", pg); 289 289 if (retval) { 290 - printk(KERN_WARNING "pmic: Interrupt request failed\n"); 290 + pr_warn("Interrupt request failed\n"); 291 291 goto err; 292 292 } 293 293