Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Denis CIOCCA <denis.ciocca@st.com>
Subject: [PATCH 21/24] iio: st_sensors: drop ACPI_PTR() and CONFIG_ACPI guards
Date: Sun, 31 Dec 2023 18:35:11 +0000	[thread overview]
Message-ID: <20231231183514.566609-22-jic23@kernel.org> (raw)
In-Reply-To: <20231231183514.566609-1-jic23@kernel.org>

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

The complexity of config guards needed for ACPI_PTR() is not worthwhile
for the small amount of saved data. This example was doing it correctly
but I am proposing dropping this so as to reduce chance of cut and paste
where it is done wrong.  Also drop now unneeded linux/acpi.h include.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Denis CIOCCA <denis.ciocca@st.com>
---
 drivers/iio/accel/st_accel_i2c.c       | 5 +----
 drivers/iio/pressure/st_pressure_i2c.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
index 71ee861b2980..fd3749871121 100644
--- a/drivers/iio/accel/st_accel_i2c.c
+++ b/drivers/iio/accel/st_accel_i2c.c
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/mod_devicetable.h>
-#include <linux/acpi.h>
 #include <linux/i2c.h>
 #include <linux/iio/iio.h>
 
@@ -127,14 +126,12 @@ static const struct of_device_id st_accel_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, st_accel_of_match);
 
-#ifdef CONFIG_ACPI
 static const struct acpi_device_id st_accel_acpi_match[] = {
 	{"SMO8840", (kernel_ulong_t)LIS2DH12_ACCEL_DEV_NAME},
 	{"SMO8A90", (kernel_ulong_t)LNG2DM_ACCEL_DEV_NAME},
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, st_accel_acpi_match);
-#endif
 
 static const struct i2c_device_id st_accel_id_table[] = {
 	{ LSM303DLH_ACCEL_DEV_NAME },
@@ -204,7 +201,7 @@ static struct i2c_driver st_accel_driver = {
 	.driver = {
 		.name = "st-accel-i2c",
 		.of_match_table = st_accel_of_match,
-		.acpi_match_table = ACPI_PTR(st_accel_acpi_match),
+		.acpi_match_table = st_accel_acpi_match,
 	},
 	.probe = st_accel_i2c_probe,
 	.id_table = st_accel_id_table,
diff --git a/drivers/iio/pressure/st_pressure_i2c.c b/drivers/iio/pressure/st_pressure_i2c.c
index 5101552e3f38..389523d6ae32 100644
--- a/drivers/iio/pressure/st_pressure_i2c.c
+++ b/drivers/iio/pressure/st_pressure_i2c.c
@@ -7,7 +7,6 @@
  * Denis Ciocca <denis.ciocca@st.com>
  */
 
-#include <linux/acpi.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/mod_devicetable.h>
@@ -55,13 +54,11 @@ static const struct of_device_id st_press_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, st_press_of_match);
 
-#ifdef CONFIG_ACPI
 static const struct acpi_device_id st_press_acpi_match[] = {
 	{"SNO9210", LPS22HB},
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, st_press_acpi_match);
-#endif
 
 static const struct i2c_device_id st_press_id_table[] = {
 	{ LPS001WP_PRESS_DEV_NAME, LPS001WP },
@@ -114,7 +111,7 @@ static struct i2c_driver st_press_driver = {
 	.driver = {
 		.name = "st-press-i2c",
 		.of_match_table = st_press_of_match,
-		.acpi_match_table = ACPI_PTR(st_press_acpi_match),
+		.acpi_match_table = st_press_acpi_match,
 	},
 	.probe = st_press_i2c_probe,
 	.id_table = st_press_id_table,
-- 
2.43.0


  parent reply	other threads:[~2023-12-31 18:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-31 18:34 [PATCH 00/24] IIO: Clean up ACPI_PTR() usage Jonathan Cameron
2023-12-31 18:34 ` [PATCH 01/24] iio: accel: da280: Stop using ACPI_PTR() Jonathan Cameron
2024-01-01 13:24   ` Hans de Goede
2023-12-31 18:34 ` [PATCH 02/24] iio: accel: kxcjk-1013: Move acpi_device_id table under ifdef CONFIG_ACPI Jonathan Cameron
2024-01-01 13:24   ` Hans de Goede
2024-01-01 23:33   ` Andy Shevchenko
2023-12-31 18:34 ` [PATCH 03/24] iio: accel: mma9551: Drop ACPI_PTR() usage Jonathan Cameron
2023-12-31 18:34 ` [PATCH 04/24] iio: accel: mma9553: " Jonathan Cameron
2023-12-31 18:34 ` [PATCH 05/24] iio: accel: mxc4005: " Jonathan Cameron
2024-01-01 23:39   ` Andy Shevchenko
2023-12-31 18:34 ` [PATCH 06/24] iio: accel: mxc6255: " Jonathan Cameron
2023-12-31 18:34 ` [PATCH 07/24] iio: accel: stk8ba50: " Jonathan Cameron
2023-12-31 18:34 ` [PATCH 08/24] iio: accel: bmc150: Drop ACPI_PTR() Jonathan Cameron
2023-12-31 18:34 ` [PATCH 09/24] iio: gyro: bmg160: Drop ACPI_PTR() usage Jonathan Cameron
2023-12-31 18:35 ` [PATCH 10/24] iio: humidity: hts221: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 11/24] iio: imu: fxos8700: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 12/24] iio: imu: kmx61: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 13/24] iio: light: jsa1212: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 14/24] iio: light: ltr501: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 15/24] iio: light: rpr0521: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 16/24] iio: light: stk3310: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 17/24] iio: light: us5182d: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 18/24] iio: magnetometer: bmc150: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 19/24] iio: magnetometer: mmc35240: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 20/24] iio: potentiometer: max5487: " Jonathan Cameron
2023-12-31 18:35 ` Jonathan Cameron [this message]
2023-12-31 18:35 ` [PATCH 22/24] iio: pressure: hp206c: drop ACPI_PTR() and CONFIG_ACPI guards Jonathan Cameron
2023-12-31 18:35 ` [PATCH 23/24] iio: light: max44000: " Jonathan Cameron
2023-12-31 18:35 ` [PATCH 24/24] iio: adc: ti-adc109s102: " Jonathan Cameron
2024-01-01 23:48 ` [PATCH 00/24] IIO: Clean up ACPI_PTR() usage Andy Shevchenko
2024-01-07 16:41   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231231183514.566609-22-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=denis.ciocca@st.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox