Commit 11383a9b authored by Igor Grinberg's avatar Igor Grinberg Committed by Tony Lindgren

arm: omap: gpmc-smsc911x: minor style fixes

replace "printk(KERN_ERR" by "pr_err("
and fix needlessly multi-lined #ifdef
Signed-off-by: default avatarIgor Grinberg <grinberg@compulab.co.il>
Acked-by: default avatarNishanth Menon <nm@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 21b42731
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#define pr_fmt(fmt) "%s: " fmt, __func__
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
...@@ -55,7 +56,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) ...@@ -55,7 +56,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
gpmc_cfg = board_data; gpmc_cfg = board_data;
if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) {
printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n"); pr_err("Failed to request GPMC mem region\n");
return; return;
} }
...@@ -63,8 +64,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) ...@@ -63,8 +64,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
gpmc_smsc911x_resources[0].end = cs_mem_base + 0xff; gpmc_smsc911x_resources[0].end = cs_mem_base + 0xff;
if (gpio_request(gpmc_cfg->gpio_irq, "smsc911x irq") < 0) { if (gpio_request(gpmc_cfg->gpio_irq, "smsc911x irq") < 0) {
printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", pr_err("Failed to request IRQ GPIO%d\n", gpmc_cfg->gpio_irq);
gpmc_cfg->gpio_irq);
goto free1; goto free1;
} }
...@@ -74,8 +74,8 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) ...@@ -74,8 +74,8 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
if (gpio_is_valid(gpmc_cfg->gpio_reset)) { if (gpio_is_valid(gpmc_cfg->gpio_reset)) {
ret = gpio_request(gpmc_cfg->gpio_reset, "smsc911x reset"); ret = gpio_request(gpmc_cfg->gpio_reset, "smsc911x reset");
if (ret) { if (ret) {
printk(KERN_ERR "Failed to request GPIO%d for smsc911x reset\n", pr_err("Failed to request reset GPIO%d\n",
gpmc_cfg->gpio_reset); gpmc_cfg->gpio_reset);
goto free2; goto free2;
} }
...@@ -92,7 +92,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) ...@@ -92,7 +92,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources), gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources),
&gpmc_smsc911x_config, sizeof(gpmc_smsc911x_config)); &gpmc_smsc911x_config, sizeof(gpmc_smsc911x_config));
if (!pdev) { if (!pdev) {
printk(KERN_ERR "Unable to register smsc911x device\n"); pr_err("Unable to register platform device\n");
gpio_free(gpmc_cfg->gpio_reset); gpio_free(gpmc_cfg->gpio_reset);
goto free2; goto free2;
} }
...@@ -104,5 +104,5 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) ...@@ -104,5 +104,5 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
free1: free1:
gpmc_cs_free(gpmc_cfg->cs); gpmc_cs_free(gpmc_cfg->cs);
printk(KERN_ERR "Could not initialize smsc911x\n"); pr_err("Could not initialize smsc911x device\n");
} }
...@@ -21,8 +21,7 @@ struct omap_smsc911x_platform_data { ...@@ -21,8 +21,7 @@ struct omap_smsc911x_platform_data {
u32 flags; u32 flags;
}; };
#if defined(CONFIG_SMSC911X) || \ #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
defined(CONFIG_SMSC911X_MODULE)
extern void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d); extern void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment