1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
2 Date: Tue, 8 Mar 2016 07:52:18 +0100
3 Subject: [PATCH] bcm47xx_sprom: Fix compilation with ssb/bcma as module
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
8 It was failing due to unknown ssb_arch_register_fallback_sprom or
9 bcma_arch_register_fallback_sprom with CONFIG_SSB=m or CONFIG_BCMA=m
11 Fixes: e8a46c88b516 ("MIPS: BCM47xx: Move SPROM driver to drivers/firmware/¨)
12 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
15 --- a/drivers/firmware/broadcom/bcm47xx_sprom.c
16 +++ b/drivers/firmware/broadcom/bcm47xx_sprom.c
17 @@ -601,7 +601,7 @@ void bcm47xx_fill_sprom(struct ssb_sprom
18 bcm47xx_sprom_fill_auto(sprom, prefix, fallback);
21 -#if defined(CONFIG_SSB_SPROM)
22 +#if IS_BUILTIN(CONFIG_SSB) && IS_ENABLED(CONFIG_SSB_SPROM)
23 static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out)
26 @@ -624,7 +624,7 @@ static int bcm47xx_get_sprom_ssb(struct
30 -#if defined(CONFIG_BCMA)
31 +#if IS_BUILTIN(CONFIG_BCMA)
33 * Having many NVRAM entries for PCI devices led to repeating prefixes like
34 * pci/1/1/ all the time and wasting flash space. So at some point Broadcom
35 @@ -719,12 +719,12 @@ int bcm47xx_sprom_register_fallbacks(voi
36 if (bcm47xx_sprom_registered)
39 -#if defined(CONFIG_SSB_SPROM)
40 +#if IS_BUILTIN(CONFIG_SSB) && IS_ENABLED(CONFIG_SSB_SPROM)
41 if (ssb_arch_register_fallback_sprom(&bcm47xx_get_sprom_ssb))
42 pr_warn("Failed to registered ssb SPROM handler\n");
45 -#if defined(CONFIG_BCMA)
46 +#if IS_BUILTIN(CONFIG_BCMA)
47 if (bcma_arch_register_fallback_sprom(&bcm47xx_get_sprom_bcma))
48 pr_warn("Failed to registered bcma SPROM handler\n");