Commit 9e993ed0 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mauro Carvalho Chehab
Browse files

media: staging: atomisp: Remove non-ACPI leftovers



Since all drivers are solely requiring ACPI enumeration, there is no
need to additionally check for legacy platform data or ACPI handle.

Remove leftovers from the sensors and platform code.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent cb02ae3d
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -1370,13 +1370,9 @@ static int gc0310_probe(struct i2c_client *client)
	dev->fmt_idx = 0;
	v4l2_i2c_subdev_init(&(dev->sd), client, &gc0310_ops);

	if (ACPI_COMPANION(&client->dev))
	pdata = gmin_camera_platform_data(&dev->sd,
					  ATOMISP_INPUT_FORMAT_RAW_8,
					  atomisp_bayer_order_grbg);
	else
		pdata = client->dev.platform_data;

	if (!pdata) {
		ret = -EINVAL;
		goto out_free;
+2 −6
Original line number Diff line number Diff line
@@ -1108,8 +1108,6 @@ static int gc2235_probe(struct i2c_client *client)
	dev->fmt_idx = 0;
	v4l2_i2c_subdev_init(&(dev->sd), client, &gc2235_ops);

	gcpdev = client->dev.platform_data;
	if (ACPI_COMPANION(&client->dev))
	gcpdev = gmin_camera_platform_data(&dev->sd,
				   ATOMISP_INPUT_FORMAT_RAW_10,
				   atomisp_bayer_order_grbg);
@@ -1147,10 +1145,8 @@ static int gc2235_probe(struct i2c_client *client)
	if (ret)
		gc2235_remove(client);

	if (ACPI_HANDLE(&client->dev))
		ret = atomisp_register_i2c_module(&dev->sd, gcpdev, RAW_CAMERA);
	return atomisp_register_i2c_module(&dev->sd, gcpdev, RAW_CAMERA);

	return ret;
out_free:
	v4l2_device_unregister_subdev(&dev->sd);
	kfree(dev);
+8 −20
Original line number Diff line number Diff line
@@ -824,22 +824,15 @@ static void *lm3554_platform_data_func(struct i2c_client *client)
{
	static struct lm3554_platform_data platform_data;

	if (ACPI_COMPANION(&client->dev)) {
	platform_data.gpio_reset =
		    desc_to_gpio(gpiod_get_index(&(client->dev),
		    desc_to_gpio(gpiod_get_index(&client->dev,
						 NULL, 2, GPIOD_OUT_LOW));
	platform_data.gpio_strobe =
		    desc_to_gpio(gpiod_get_index(&(client->dev),
		    desc_to_gpio(gpiod_get_index(&client->dev,
						 NULL, 0, GPIOD_OUT_LOW));
	platform_data.gpio_torch =
		    desc_to_gpio(gpiod_get_index(&(client->dev),
		    desc_to_gpio(gpiod_get_index(&client->dev,
						 NULL, 1, GPIOD_OUT_LOW));
	} else {
		platform_data.gpio_reset = -1;
		platform_data.gpio_strobe = -1;
		platform_data.gpio_torch = -1;
	}

	dev_info(&client->dev, "camera pdata: lm3554: reset: %d strobe %d torch %d\n",
		platform_data.gpio_reset, platform_data.gpio_strobe,
		platform_data.gpio_torch);
@@ -868,9 +861,6 @@ static int lm3554_probe(struct i2c_client *client)
	if (!flash)
		return -ENOMEM;

	flash->pdata = client->dev.platform_data;

	if (!flash->pdata || ACPI_COMPANION(&client->dev))
	flash->pdata = lm3554_platform_data_func(client);

	v4l2_i2c_subdev_init(&flash->sd, client, &lm3554_ops);
@@ -914,9 +904,7 @@ static int lm3554_probe(struct i2c_client *client)
		dev_err(&client->dev, "gpio request/direction_output fail");
		goto fail2;
	}
	if (ACPI_HANDLE(&client->dev))
		err = atomisp_register_i2c_module(&flash->sd, NULL, LED_FLASH);
	return 0;
	return atomisp_register_i2c_module(&flash->sd, NULL, LED_FLASH);
fail2:
	media_entity_cleanup(&flash->sd.entity);
	v4l2_ctrl_handler_free(&flash->ctrl_handler);
+3 −5
Original line number Diff line number Diff line
@@ -1844,8 +1844,6 @@ static int mt9m114_probe(struct i2c_client *client)
		return -ENOMEM;

	v4l2_i2c_subdev_init(&dev->sd, client, &mt9m114_ops);
	pdata = client->dev.platform_data;
	if (ACPI_COMPANION(&client->dev))
	pdata = gmin_camera_platform_data(&dev->sd,
					  ATOMISP_INPUT_FORMAT_RAW_10,
					  atomisp_bayer_order_grbg);
+3 −7
Original line number Diff line number Diff line
@@ -1447,13 +1447,9 @@ static int ov2680_probe(struct i2c_client *client)
	dev->fmt_idx = 0;
	v4l2_i2c_subdev_init(&(dev->sd), client, &ov2680_ops);

	if (ACPI_COMPANION(&client->dev))
	pdata = gmin_camera_platform_data(&dev->sd,
					  ATOMISP_INPUT_FORMAT_RAW_10,
					  atomisp_bayer_order_bggr);
	else
		pdata = client->dev.platform_data;

	if (!pdata) {
		ret = -EINVAL;
		goto out_free;
Loading