Skip to contentSkip to conversation

iio: am2315: Remove ACPI support

PATCH Applied Guenter Roeck 3 participants 4 messages May 4, 2021 – May 8, 2021 IIO

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 iio: am2315: Remove ACPI support

With CONFIG_ACPI=n and -Werror, 0-day reports:

drivers/iio/humidity/am2315.c:259:36: error:
'am2315_acpi_id' defined but not used

According to Andy Shevchenko, the ACPI ID used in this driver is fake and does not really exist. Remove it and with it ACPI support from the driver.

---
v2: Instead of making am2315_acpi_id depend on CONFIG_ACPI,
remove ACPI support entirely.

 drivers/iio/humidity/am2315.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/iio/humidity/am2315.c +0 -9
index 23bc9c784ef4..8d7ec2f5acf8 100644
@@ -7,7 +7,6 @@
  * 7-bit I2C address: 0x5C.
  */
 
-#include <linux/acpi.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
 #include <linux/kernel.h>
@@ -256,17 +255,9 @@ static const struct i2c_device_id am2315_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);
 
-static const struct acpi_device_id am2315_acpi_id[] = {
-	{"AOS2315", 0},
-	{}
-};
-
-MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
-
 static struct i2c_driver am2315_driver = {
 	.driver = {
 		.name = "am2315",
-		.acpi_match_table = ACPI_PTR(am2315_acpi_id),
 	},
 	.probe =            am2315_probe,
 	.id_table =         am2315_i2c_id,
Signature · 1 line
2.25.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Guenter Roeck

With CONFIG_ACPI=n and -Werror, 0-day reports:

drivers/iio/humidity/am2315.c:259:36: error:
'am2315_acpi_id' defined but not used

According to Andy Shevchenko, the ACPI ID used in this driver is fake and does not really exist. Remove it and with it ACPI support from the driver.

As I have found zarro evidences, I agree with removal. We must not create fake ACPI IDs on our owns. If anybody will find a device that is using this broken ID for real, then we may add it back.

Quoted 43 lines

---
v2: Instead of making am2315_acpi_id depend on CONFIG_ACPI,
remove ACPI support entirely.

 drivers/iio/humidity/am2315.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/iio/humidity/am2315.c +0 -10
index 23bc9c784ef4..8d7ec2f5acf8 100644
@@ -7,7 +7,6 @@
  * 7-bit I2C address: 0x5C.
  */
 
-#include <linux/acpi.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
 #include <linux/kernel.h>
@@ -256,17 +255,9 @@ static const struct i2c_device_id am2315_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);
 
-static const struct acpi_device_id am2315_acpi_id[] = {
-       {"AOS2315", 0},
-       {}
-};
-
-MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
-
 static struct i2c_driver am2315_driver = {
        .driver = {
                .name = "am2315",
-               .acpi_match_table = ACPI_PTR(am2315_acpi_id),
        },
        .probe =            am2315_probe,
        .id_table =         am2315_i2c_id,
--

2.25.1

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Applied
#2 lore raw
Quoted 7 lines · On Tue, 4 May 2021 18:41:02 +0300 Andy Shevchenko <[email protected]>…
Quoted 6 lines · Guenter Roeck

With CONFIG_ACPI=n and -Werror, 0-day reports:

drivers/iio/humidity/am2315.c:259:36: error:
'am2315_acpi_id' defined but not used

Quoted 8 lines
Quoted 3 lines

According to Andy Shevchenko, the ACPI ID used in this driver is fake and does not really exist. Remove it and with it ACPI support from the driver.

As I have found zarro evidences, I agree with removal. We must not create fake ACPI IDs on our owns. If anybody will find a device that is using this broken ID for real, then we may add it back.

Applied to the togreg branch of iio.git with the commit message changed to reflect PRP0001 still working with this gone.

Thanks,

Jonathan

Quoted 46 lines
Quoted 44 lines

---
v2: Instead of making am2315_acpi_id depend on CONFIG_ACPI,
remove ACPI support entirely.

 drivers/iio/humidity/am2315.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/iio/humidity/am2315.c +0 -10
index 23bc9c784ef4..8d7ec2f5acf8 100644
@@ -7,7 +7,6 @@
  * 7-bit I2C address: 0x5C.
  */
 
-#include <linux/acpi.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
 #include <linux/kernel.h>
@@ -256,17 +255,9 @@ static const struct i2c_device_id am2315_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);
 
-static const struct acpi_device_id am2315_acpi_id[] = {
-       {"AOS2315", 0},
-       {}
-};
-
-MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
-
 static struct i2c_driver am2315_driver = {
        .driver = {
                .name = "am2315",
-               .acpi_match_table = ACPI_PTR(am2315_acpi_id),
        },
        .probe =            am2315_probe,
        .id_table =         am2315_i2c_id,
--

2.25.1

maintainer
#3 lore raw
Quoted 14 lines · On Sat, 8 May 2021 16:25:35 +0100 Jonathan Cameron <[email protected]> wrote:
Quoted 11 lines · On Tue, 4 May 2021 18:41:02 +0300 Andy Shevchenko <[email protected]>…
Quoted 9 lines · Guenter Roeck

With CONFIG_ACPI=n and -Werror, 0-day reports:

drivers/iio/humidity/am2315.c:259:36: error:
'am2315_acpi_id' defined but not used

According to Andy Shevchenko, the ACPI ID used in this driver is fake and does not really exist. Remove it and with it ACPI support from the driver.

Quoted 7 lines
Quoted 4 lines

As I have found zarro evidences, I agree with removal. We must not create fake ACPI IDs on our owns. If anybody will find a device that is using this broken ID for real, then we may add it back.

Applied to the togreg branch of iio.git with the commit message changed to reflect PRP0001 still working with this gone.

Changed that commit message again, after realizing that there is not of_device_id table in this driver currently so I don't think PRP0001 current works either.

Quoted 51 lines

Thanks,

Jonathan

Quoted 46 lines
Quoted 44 lines

---
v2: Instead of making am2315_acpi_id depend on CONFIG_ACPI,
remove ACPI support entirely.

 drivers/iio/humidity/am2315.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/iio/humidity/am2315.c +0 -10
index 23bc9c784ef4..8d7ec2f5acf8 100644
@@ -7,7 +7,6 @@
  * 7-bit I2C address: 0x5C.
  */
 
-#include <linux/acpi.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
 #include <linux/kernel.h>
@@ -256,17 +255,9 @@ static const struct i2c_device_id am2315_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);
 
-static const struct acpi_device_id am2315_acpi_id[] = {
-       {"AOS2315", 0},
-       {}
-};
-
-MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
-
 static struct i2c_driver am2315_driver = {
        .driver = {
                .name = "am2315",
-               .acpi_match_table = ACPI_PTR(am2315_acpi_id),
        },
        .probe =            am2315_probe,
        .id_table =         am2315_i2c_id,
--

2.25.1