summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-03-13 15:49:00 -0700
committerOlof Johansson <olof@lixom.net>2012-03-13 15:49:00 -0700
commit5353ec2cd13deb4f70aef1dcd296cadaac3f780b (patch)
treea1309e1bf4332e4b792f53eadaf47d0c97959d31 /arch
parentfde7d9049e55ab85a390be7f415d74c9f62dd0f9 (diff)
parentbb60424af517d6e6148505fb5ef256caa91b5b43 (diff)
downloadlinux-5353ec2cd13deb4f70aef1dcd296cadaac3f780b.tar.bz2
Merge branch 'fix-smsc911x-regulator' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From Tony Lindgren: "Here's one more kernel panic fix that I dropped from last weeks fixes as it was still being discussed. This is a fix for the regression caused by fixing an earlier regression for smsc911x fixed regulators :( Turns out that we have more than one smsc911x on some boards, and the earlier fix causes a kernel panic for board trying to register second smsc911x instance, even if the second smsc911x is on an add-on board that is not connected. Note that the boards with second smsc911x will also need to be patched later on to provide their own regulators." * 'fix-smsc911x-regulator' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: gpmc-smsc911x: only register regulator for first instance
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/gpmc-smsc911x.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index bbb870c04a5e..5e5880d6d099 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -101,10 +101,13 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
gpmc_cfg = board_data;
- ret = platform_device_register(&gpmc_smsc911x_regulator);
- if (ret < 0) {
- pr_err("Unable to register smsc911x regulators: %d\n", ret);
- return;
+ if (!gpmc_cfg->id) {
+ ret = platform_device_register(&gpmc_smsc911x_regulator);
+ if (ret < 0) {
+ pr_err("Unable to register smsc911x regulators: %d\n",
+ ret);
+ return;
+ }
}
if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) {