summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuss Dill <Russ.Dill@ti.com>2012-03-23 10:21:34 +0100
committerTony Lindgren <tony@atomide.com>2012-04-03 19:29:12 +0200
commita0dbf2a726e5387251a567c8531d9fd3e34d2dfb (patch)
tree06610edbaf46f1bd3370aee1e0388e44777253e9
parentARM: OMAP2+: smsc911x: Remove odd gpmc_cfg/board_data redirection (diff)
downloadlinux-a0dbf2a726e5387251a567c8531d9fd3e34d2dfb.tar.xz
linux-a0dbf2a726e5387251a567c8531d9fd3e34d2dfb.zip
ARM: OMAP2+ smsc911x: Fix possible stale smsc911x flags
If this function is called the first time with flags set, and the second time without flags set then the leftover flags from the first called will be used rather than the desired default flags. Signed-off-by: Russ Dill <russ.dill@ti.com> Tested-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/gpmc-smsc911x.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index aa0c296ff34a..f9446eaf9176 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -39,7 +39,6 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = {
.phy_interface = PHY_INTERFACE_MODE_MII,
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
- .flags = SMSC911X_USE_16BIT,
};
static struct regulator_consumer_supply gpmc_smsc911x_supply[] = {
@@ -135,8 +134,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg)
gpio_set_value(gpmc_cfg->gpio_reset, 1);
}
- if (gpmc_cfg->flags)
- gpmc_smsc911x_config.flags = gpmc_cfg->flags;
+ gpmc_smsc911x_config.flags = gpmc_cfg->flags ? : SMSC911X_USE_16BIT;
pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id,
gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources),