Skip to content

Commit

Permalink
pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard
Browse files Browse the repository at this point in the history
Clang warns when CONFIG_ACPI is unset:

 drivers/pinctrl/qcom/pinctrl-sdm845.c:1320:5: warning: 'CONFIG_ACPI' is
 not defined, evaluates to 0 [-Wundef]
 #if CONFIG_ACPI
     ^
 1 warning generated.

Use ifdef instead of if to resolve this.

Fixes: a229105 ("pinctrl: qcom: sdm845: Provide ACPI support")
Link: https://github.com/ClangBuiltLinux/linux/issues/569
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Nathan Chancellor authored and Linus Walleij committed Jun 25, 2019
1 parent cf75b8f commit 3fe2f17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/qcom/pinctrl-sdm845.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ static int sdm845_pinctrl_probe(struct platform_device *pdev)
return ret;
}

#if CONFIG_ACPI
#ifdef CONFIG_ACPI
static const struct acpi_device_id sdm845_pinctrl_acpi_match[] = {
{ "QCOM0217"},
{ },
Expand Down

0 comments on commit 3fe2f17

Please sign in to comment.