mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 04:20:53 +07:00
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: a05a2e7998
("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>
This commit is contained in:
parent
dad0653229
commit
8ca6ff16de
@ -148,13 +148,12 @@ static const struct of_device_id sun6i_prcm_dt_ids[] = {
|
||||
|
||||
static int sun6i_prcm_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
const struct of_device_id *match;
|
||||
const struct prcm_data *data;
|
||||
struct resource *res;
|
||||
int ret;
|
||||
|
||||
match = of_match_node(sun6i_prcm_dt_ids, np);
|
||||
match = of_match_node(sun6i_prcm_dt_ids, pdev->dev.of_node);
|
||||
if (!match)
|
||||
return -EINVAL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user