diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-02-16 16:10:05 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-02-16 16:10:05 +0000 |
commit | 17dc7e0fdee5acd3f1e5f54b98df1a782a2dbdd9 (patch) | |
tree | e7844ad2ba48bb2a1ff47e604554aa905a88be5a /target/linux | |
parent | 5fa26ab96ae22c215e2a86812a2c04bfd50a5fc3 (diff) | |
download | master-187ad058-17dc7e0fdee5acd3f1e5f54b98df1a782a2dbdd9.tar.gz master-187ad058-17dc7e0fdee5acd3f1e5f54b98df1a782a2dbdd9.tar.bz2 master-187ad058-17dc7e0fdee5acd3f1e5f54b98df1a782a2dbdd9.zip |
bcm53xx: sprom: prepare to support other hosttype-s
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44463 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c b/target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c index 4970a5b460..6b3ab96749 100644 --- a/target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c +++ b/target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c @@ -673,7 +673,14 @@ static int bcm47xx_sprom_init(struct bcma_bus *bus, struct ssb_sprom *out) if (!nvram_dev) return -ENOMEM; - fill.prefix = of_get_property(np, "prefix", NULL); + switch (bus->hosttype) { + case BCMA_HOSTTYPE_SOC: + fill.prefix = of_get_property(np, "prefix", NULL); + break; + default: + pr_err("Unable to fill SPROM for given hosttype.\n"); + return -EINVAL; + } fill.fallback = false; fill.getenv = bcm47xx_sprom_getenv; |