#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/i2c.h>
-#include <linux/pci.h>
#include <linux/property.h>
#include <media/v4l2-fwnode.h>
static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg,
struct ipu_bridge *bridge,
- struct pci_dev *ipu)
+ struct device *dev)
{
struct fwnode_handle *fwnode, *primary;
struct ipu_sensor *sensor;
if (bridge->n_sensors >= IPU_MAX_PORTS) {
acpi_dev_put(adev);
- dev_err(&ipu->dev, "Exceeded available IPU ports\n");
+ dev_err(dev, "Exceeded available IPU ports\n");
return -EINVAL;
}
ipu_bridge_instantiate_vcm_i2c_client(sensor);
- dev_info(&ipu->dev, "Found supported sensor %s\n",
+ dev_info(dev, "Found supported sensor %s\n",
acpi_dev_name(adev));
bridge->n_sensors++;
}
static int ipu_bridge_connect_sensors(struct ipu_bridge *bridge,
- struct pci_dev *ipu)
+ struct device *dev)
{
unsigned int i;
int ret;
const struct ipu_sensor_config *cfg =
&ipu_supported_sensors[i];
- ret = ipu_bridge_connect_sensor(cfg, bridge, ipu);
+ ret = ipu_bridge_connect_sensor(cfg, bridge, dev);
if (ret)
goto err_unregister_sensors;
}
return ready;
}
-int ipu_bridge_init(struct pci_dev *ipu)
+int ipu_bridge_init(struct device *dev)
{
- struct device *dev = &ipu->dev;
struct fwnode_handle *fwnode;
struct ipu_bridge *bridge;
unsigned int i;
for (i = 0; i < IPU_MAX_LANES; i++)
bridge->data_lanes[i] = i + 1;
- ret = ipu_bridge_connect_sensors(bridge, ipu);
+ ret = ipu_bridge_connect_sensors(bridge, dev);
if (ret || bridge->n_sensors == 0)
goto err_unregister_ipu;