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

regulators: max8998.c: use dev_err() instead of printk()

Fixes the following checkpatch warning:

WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...

Signed-off-by: Thiago Farina <tfarina@chromium.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Thiago Farina and committed by
Mark Brown
9df19a55 6dbe51c2

+6 -3
+6 -3
drivers/regulator/max8998.c
··· 665 665 gpio_is_valid(pdata->buck1_set2)) { 666 666 /* Check if SET1 is not equal to 0 */ 667 667 if (!pdata->buck1_set1) { 668 - printk(KERN_ERR "MAX8998 SET1 GPIO defined as 0 !\n"); 668 + dev_err(&pdev->dev, 669 + "MAX8998 SET1 GPIO defined as 0 !\n"); 669 670 WARN_ON(!pdata->buck1_set1); 670 671 ret = -EIO; 671 672 goto err_out; 672 673 } 673 674 /* Check if SET2 is not equal to 0 */ 674 675 if (!pdata->buck1_set2) { 675 - printk(KERN_ERR "MAX8998 SET2 GPIO defined as 0 !\n"); 676 + dev_err(&pdev->dev, 677 + "MAX8998 SET2 GPIO defined as 0 !\n"); 676 678 WARN_ON(!pdata->buck1_set2); 677 679 ret = -EIO; 678 680 goto err_out; ··· 740 738 if (gpio_is_valid(pdata->buck2_set3)) { 741 739 /* Check if SET3 is not equal to 0 */ 742 740 if (!pdata->buck2_set3) { 743 - printk(KERN_ERR "MAX8998 SET3 GPIO defined as 0 !\n"); 741 + dev_err(&pdev->dev, 742 + "MAX8998 SET3 GPIO defined as 0 !\n"); 744 743 WARN_ON(!pdata->buck2_set3); 745 744 ret = -EIO; 746 745 goto err_out;