Skip to contentSkip to conversation

i2c: qup: fix building without CONFIG_ACPI

PATCH Applied Arnd Bergmann 3 participants 3 messages May 30, 2018 – May 31, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: qup: fix building without CONFIG_ACPI

The added Centriq support broke compilation with CONFIG_ACPI disabled:

drivers/i2c/busses/i2c-qup.c: In function 'qup_i2c_probe':
drivers/i2c/busses/i2c-qup.c:1707:25: error: 'qup_i2c_acpi_match' undeclared (first use in this function); did you mean 'qup_i2c_recv_data'?

This fixes it by removing the extraneous #ifdef. All ACPI specific code will be dropped implicitly when that option is disabled, but the compiler first needs to see it.

Fixes 902a91a02bdf ("i2c: qup: add probe path for Centriq ACPI devices")
---
 drivers/i2c/busses/i2c-qup.c | 2 --
 1 file changed, 2 deletions(-)
drivers/i2c/busses/i2c-qup.c +0 -2
index 4f793b5d0c3b..9cfcc0473227 100644
@@ -1657,13 +1657,11 @@ static void qup_i2c_disable_clocks(struct qup_i2c_dev *qup)
 	clk_disable_unprepare(qup->pclk);
 }
 
-#if IS_ENABLED(CONFIG_ACPI)
 static const struct acpi_device_id qup_i2c_acpi_match[] = {
 	{ "QCOM8010"},
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, qup_i2c_acpi_match);
-#endif
 
 static int qup_i2c_probe(struct platform_device *pdev)
 {
Signature · 1 line
2.9.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 24 lines · Arnd Bergmann

The added Centriq support broke compilation with CONFIG_ACPI disabled:

drivers/i2c/busses/i2c-qup.c: In function 'qup_i2c_probe':
drivers/i2c/busses/i2c-qup.c:1707:25: error: 'qup_i2c_acpi_match' undeclared (first use in this function); did you mean 'qup_i2c_recv_data'?

This fixes it by removing the extraneous #ifdef. All ACPI specific code will be dropped implicitly when that option is disabled, but the compiler first needs to see it.

Fixes 902a91a02bdf ("i2c: qup: add probe path for Centriq ACPI devices")
---
  drivers/i2c/busses/i2c-qup.c | 2 --
  1 file changed, 2 deletions(-)
drivers/i2c/busses/i2c-qup.c +0 -0
index 4f793b5d0c3b..9cfcc0473227 100644
@@ -1657,13 +1657,11 @@ static void qup_i2c_disable_clocks(struct qup_i2c_dev *qup)
  	clk_disable_unprepare(qup->pclk);
  }
 

drivers/i2c/busses/i2c-qup.c static void qup_i2c_disable_clocks(struct qup_i2c_dev *qup) · line 1667

Quoted 10 lines
drivers/i2c/busses/i2c-qup.c +0 -2
-#if IS_ENABLED(CONFIG_ACPI)
  static const struct acpi_device_id qup_i2c_acpi_match[] = {
  	{ "QCOM8010"},
  	{ },
  };
  MODULE_DEVICE_TABLE(acpi, qup_i2c_acpi_match);
-#endif
 
  static int qup_i2c_probe(struct platform_device *pdev)
  {

Yeah this is correct.

Signature · 3 lines
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
Applied
#2 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann

The added Centriq support broke compilation with CONFIG_ACPI disabled:

drivers/i2c/busses/i2c-qup.c: In function 'qup_i2c_probe':
drivers/i2c/busses/i2c-qup.c:1707:25: error: 'qup_i2c_acpi_match' undeclared (first use in this function); did you mean 'qup_i2c_recv_data'?

This fixes it by removing the extraneous #ifdef. All ACPI specific code will be dropped implicitly when that option is disabled, but the compiler first needs to see it.

Fixes 902a91a02bdf ("i2c: qup: add probe path for Centriq ACPI devices")

Applied to for-next, thanks!