diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-12-28 11:49:19 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-17 19:04:26 +0100 |
commit | 1c856b4b114331d13ee01e92d3fa638797759748 (patch) | |
tree | 2c1f64852cdf5356c6adc47c451beb76d2e8105e /drivers | |
parent | 5c5a7680e67ba6fbbb5f4d79fa41485450c1985c (diff) | |
download | linux-stable-1c856b4b114331d13ee01e92d3fa638797759748.tar.gz linux-stable-1c856b4b114331d13ee01e92d3fa638797759748.tar.bz2 linux-stable-1c856b4b114331d13ee01e92d3fa638797759748.zip |
media: ipu3-cio2: Don't dereference fwnode handle
Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly,
which is a better coding practice.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Daniel Scally <dan.scally@ideasonboard.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Link: https://lore.kernel.org/r/20221228094922.84119-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/pci/intel/ipu3/cio2-bridge.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/pci/intel/ipu3/cio2-bridge.c b/drivers/media/pci/intel/ipu3/cio2-bridge.c index df6c94da2f6a..18974a72e94a 100644 --- a/drivers/media/pci/intel/ipu3/cio2-bridge.c +++ b/drivers/media/pci/intel/ipu3/cio2-bridge.c @@ -263,7 +263,7 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg, struct cio2_bridge *bridge, struct pci_dev *cio2) { - struct fwnode_handle *fwnode; + struct fwnode_handle *fwnode, *primary; struct cio2_sensor *sensor; struct acpi_device *adev; acpi_status status; @@ -322,7 +322,9 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg, } sensor->adev = acpi_dev_get(adev); - adev->fwnode.secondary = fwnode; + + primary = acpi_fwnode_handle(adev); + primary->secondary = fwnode; cio2_bridge_instantiate_vcm_i2c_client(sensor); |