From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: linux-acpi@vger.kernel.org, rafael@kernel.org
Subject: [PATCH 1/3] media: ipu-bridge: Drop redundant ACPI_PTR() usage
Date: Fri, 28 Aug 2026 11:43:26 +0300 [thread overview]
Message-ID: <20260828084328.257703-2-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20260828084328.257703-1-sakari.ailus@linux.intel.com>
The ipu-bridge depends on CONFIG_ACPI, therefore ACPI_PTR(ptr) always
yields ptr. Drop all use of ACPI_PTR() in the ipu-bridge.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/pci/intel/ipu-bridge.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index f9efa501e8cf..cdd654efd1dd 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -17,7 +17,7 @@
#include <media/ipu-bridge.h>
#include <media/v4l2-fwnode.h>
-#define ADEV_DEV(adev) ACPI_PTR(&((adev)->dev))
+#define ADEV_DEV(adev) &(adev)->dev
/*
* 92335fcf-3203-4472-af93-7b4453ac29da
@@ -239,12 +239,12 @@ static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev
for (i = 0; i < ARRAY_SIZE(ivsc_acpi_ids); i++) {
const struct acpi_device_id *acpi_id = &ivsc_acpi_ids[i];
struct acpi_device *consumer, *ivsc_adev;
- acpi_handle handle = acpi_device_handle(ACPI_PTR(adev));
+ acpi_handle handle = acpi_device_handle(adev);
for_each_acpi_dev_match(ivsc_adev, acpi_id->id, NULL, -1)
/* camera sensor depends on IVSC in DSDT if exist */
for_each_acpi_consumer_dev(ivsc_adev, consumer)
- if (ACPI_PTR(consumer->handle) == handle) {
+ if (consumer->handle == handle) {
acpi_dev_put(consumer);
return ivsc_adev;
}
@@ -322,8 +322,7 @@ static int ipu_bridge_read_acpi_buffer(struct acpi_device *adev, char *id,
acpi_status status;
int ret = 0;
- status = acpi_evaluate_object(ACPI_PTR(adev->handle),
- id, NULL, &buffer);
+ status = acpi_evaluate_object(adev->handle, id, NULL, &buffer);
if (ACPI_FAILURE(status))
return -ENODEV;
@@ -379,7 +378,7 @@ static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_dev
enum v4l2_fwnode_orientation orientation;
struct acpi_pld_info *pld = NULL;
- if (!acpi_get_physical_device_location(ACPI_PTR(adev->handle), &pld)) {
+ if (!acpi_get_physical_device_location(adev->handle, &pld)) {
dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n");
return V4L2_FWNODE_ORIENTATION_EXTERNAL;
}
@@ -785,7 +784,7 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg,
int ret;
for_each_acpi_dev_match(adev, cfg->hid, NULL, -1) {
- if (!ACPI_PTR(adev->status.enabled))
+ if (!adev->status.enabled)
continue;
if (bridge->n_sensors >= IPU_MAX_PORTS) {
@@ -821,7 +820,7 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg,
goto err_free_swnodes;
}
- sensor->adev = ACPI_PTR(acpi_dev_get(adev));
+ sensor->adev = acpi_dev_get(adev);
primary = acpi_fwnode_handle(adev);
primary->secondary = fwnode;
@@ -881,7 +880,7 @@ static int ipu_bridge_ivsc_is_ready(void)
&ipu_supported_sensors[i];
for_each_acpi_dev_match(sensor_adev, cfg->hid, NULL, -1) {
- if (!ACPI_PTR(sensor_adev->status.enabled))
+ if (!sensor_adev->status.enabled)
continue;
adev = ipu_bridge_get_ivsc_acpi_dev(sensor_adev);
--
2.47.3
next prev parent reply other threads:[~2026-08-28 8:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 8:43 [PATCH 0/3] Make ACPI_PTR() use PTR_IF() Sakari Ailus
2026-08-28 8:43 ` Sakari Ailus [this message]
2026-08-28 9:58 ` [PATCH 1/3] media: ipu-bridge: Drop redundant ACPI_PTR() usage Rafael J. Wysocki (Intel)
2026-08-28 8:43 ` [PATCH 2/3] ACPI: Use PTR_IF() for ACPI_PTR() Sakari Ailus
2026-08-28 9:56 ` Rafael J. Wysocki (Intel)
2026-08-28 8:43 ` [PATCH 3/3] media: i2c: Use ACPI_PTR() for ACPI ID tables Sakari Ailus
2026-08-28 13:30 ` Andy Shevchenko
2026-08-28 15:10 ` Sakari Ailus
2026-08-28 15:22 ` Andy Shevchenko
2026-08-28 15:44 ` Sakari Ailus
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=20260828084328.257703-2-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=rafael@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.