Commit 1c856b4b authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: default avatarDaniel Scally <dan.scally@ideasonboard.com>
Acked-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: default avatarDaniel Scally <dan.scally@ideasonboard.com>
Link: https://lore.kernel.org/r/20221228094922.84119-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5c5a7680
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment