[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240326202813.1425431-3-andriy.shevchenko@linux.intel.com>
Date: Tue, 26 Mar 2024 22:27:03 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Hans de Goede <hdegoede@...hat.com>,
linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v1 2/2] media: atomisp: Replace open-coded i2c_find_device_by_fwnode()
gmin_i2c_dev_exists() is using open-coded variant of
i2c_find_device_by_fwnode(). Replace it with a corresponding call.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
index 80aa2211cdc3..b7c477280986 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
@@ -394,12 +394,10 @@ static struct i2c_client *gmin_i2c_dev_exists(struct device *dev, char *name,
if (!adev)
return NULL;
- d = bus_find_device_by_acpi_dev(&i2c_bus_type, adev);
+ d = get_device(acpi_get_first_physical_node(adev));
acpi_dev_put(adev);
- if (!d)
- return NULL;
- *client = i2c_verify_client(d);
+ *client = i2c_find_device_by_fwnode(dev_fwnode(d));
put_device(d);
dev_dbg(dev, "found '%s' at address 0x%02x, adapter %d\n",
--
2.43.0.rc1.1.gbec44491f096
Powered by blists - more mailing lists