From 4c98253648c0b4a364dce28d69f04219bc8bc4d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 16 Feb 2015 16:10:05 +0000 Subject: [PATCH] bcm53xx: sprom: prepare to support other hosttype-s MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki SVN-Revision: 44463 --- target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c b/target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c index 4970a5b460e8..6b3ab9674977 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; -- 2.30.2