diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-04-16 08:24:59 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2019-05-14 03:13:27 -0400 |
commit | 8ca6ff16de55085e600c75afc946862a46472127 (patch) | |
tree | 8a1a60f6a4d7e79e5c22ea854b6f93ae4e7e44cd | |
parent | dad06532292d77f37fbe831a02948a593500f682 (diff) |
mfd: sun6i-prcm: Fix build warning for non-OF configurations
When CONFIG_OF is disabled, we get a harmless warning about an
unused variable:
drivers/mfd/sun6i-prcm.c: In function 'sun6i_prcm_probe':
drivers/mfd/sun6i-prcm.c:151:22: error: unused variable 'np' [-Werror=unused-variable]
Remove the variable and open-code the value in the only place
it is used, so it can get left out as well without CONFIG_OF.
Fixes: a05a2e7998ab ("mfd: sun6i-prcm: Allow to compile with COMPILE_TEST")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/sun6i-prcm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/sun6i-prcm.c b/drivers/mfd/sun6i-prcm.c index 2b658bed47db..2f12a415b807 100644 --- a/drivers/mfd/sun6i-prcm.c +++ b/drivers/mfd/sun6i-prcm.c | |||
@@ -148,13 +148,12 @@ static const struct of_device_id sun6i_prcm_dt_ids[] = { | |||
148 | 148 | ||
149 | static int sun6i_prcm_probe(struct platform_device *pdev) | 149 | static int sun6i_prcm_probe(struct platform_device *pdev) |
150 | { | 150 | { |
151 | struct device_node *np = pdev->dev.of_node; | ||
152 | const struct of_device_id *match; | 151 | const struct of_device_id *match; |
153 | const struct prcm_data *data; | 152 | const struct prcm_data *data; |
154 | struct resource *res; | 153 | struct resource *res; |
155 | int ret; | 154 | int ret; |
156 | 155 | ||
157 | match = of_match_node(sun6i_prcm_dt_ids, np); | 156 | match = of_match_node(sun6i_prcm_dt_ids, pdev->dev.of_node); |
158 | if (!match) | 157 | if (!match) |
159 | return -EINVAL; | 158 | return -EINVAL; |
160 | 159 | ||