Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

media: staging: atomisp: Switch i2c drivers to use ->probe_new()



Since most of the drivers are being used on ACPI enabled platforms
there is no need to keep legacy API support for them. Thus, switch
to ->probe_new() callback and remove orphaned 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 2cb63c4c
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ source "drivers/staging/media/atomisp/i2c/ov5693/Kconfig"

config VIDEO_ATOMISP_OV2722
       tristate "OVT ov2722 sensor support"
	depends on ACPI
       depends on I2C && VIDEO_V4L2
       ---help---
	 This is a Video4Linux2 sensor-level driver for the OVT
@@ -17,6 +18,7 @@ config VIDEO_ATOMISP_OV2722

config VIDEO_ATOMISP_GC2235
       tristate "Galaxy gc2235 sensor support"
	depends on ACPI
       depends on I2C && VIDEO_V4L2
       ---help---
	 This is a Video4Linux2 sensor-level driver for the OVT
@@ -28,6 +30,7 @@ config VIDEO_ATOMISP_GC2235

config VIDEO_ATOMISP_OV8858
       tristate "Omnivision ov8858 sensor support"
	depends on ACPI
       depends on I2C && VIDEO_V4L2 && VIDEO_ATOMISP
       ---help---
	 This is a Video4Linux2 sensor-level driver for the Omnivision
@@ -49,6 +52,7 @@ config VIDEO_ATOMISP_MSRLIST_HELPER

config VIDEO_ATOMISP_MT9M114
       tristate "Aptina mt9m114 sensor support"
	depends on ACPI
       depends on I2C && VIDEO_V4L2
       ---help---
	 This is a Video4Linux2 sensor-level driver for the Micron
@@ -60,6 +64,7 @@ config VIDEO_ATOMISP_MT9M114

config VIDEO_ATOMISP_GC0310
	tristate "GC0310 sensor support"
	depends on ACPI
	depends on I2C && VIDEO_V4L2
	---help---
	  This is a Video4Linux2 sensor-level driver for the Galaxycore
@@ -67,6 +72,7 @@ config VIDEO_ATOMISP_GC0310
	 
config VIDEO_ATOMISP_OV2680
       tristate "Omnivision OV2680 sensor support"
	depends on ACPI
       depends on I2C && VIDEO_V4L2
       ---help---
	 This is a Video4Linux2 sensor-level driver for the Omnivision
@@ -82,6 +88,7 @@ config VIDEO_ATOMISP_OV2680

config VIDEO_ATOMISP_LM3554
       tristate "LM3554 flash light driver"
	depends on ACPI
       depends on VIDEO_V4L2 && I2C
       ---help---
	 This is a Video4Linux2 sub-dev driver for the LM3554
@@ -89,5 +96,3 @@ config VIDEO_ATOMISP_LM3554

	 To compile this driver as a module, choose M here: the
	 module will be called lm3554

+4 −8
Original line number Diff line number Diff line
@@ -1375,8 +1375,7 @@ static int gc0310_remove(struct i2c_client *client)
	return 0;
}

static int gc0310_probe(struct i2c_client *client,
			const struct i2c_device_id *id)
static int gc0310_probe(struct i2c_client *client)
{
	struct gc0310_device *dev;
	int ret;
@@ -1455,18 +1454,15 @@ static const struct acpi_device_id gc0310_acpi_match[] = {
	{"INT0310"},
	{},
};

MODULE_DEVICE_TABLE(acpi, gc0310_acpi_match);

MODULE_DEVICE_TABLE(i2c, gc0310_id);
static struct i2c_driver gc0310_driver = {
	.driver = {
		.name = GC0310_NAME,
		.acpi_match_table = ACPI_PTR(gc0310_acpi_match),
		.name = "gc0310",
		.acpi_match_table = gc0310_acpi_match,
	},
	.probe = gc0310_probe,
	.probe_new = gc0310_probe,
	.remove = gc0310_remove,
	.id_table = gc0310_id,
};
module_i2c_driver(gc0310_driver);

+5 −8
Original line number Diff line number Diff line
@@ -1114,8 +1114,7 @@ static int gc2235_remove(struct i2c_client *client)
	return 0;
}

static int gc2235_probe(struct i2c_client *client,
			const struct i2c_device_id *id)
static int gc2235_probe(struct i2c_client *client)
{
	struct gc2235_device *dev;
	void *gcpdev;
@@ -1185,17 +1184,15 @@ static const struct acpi_device_id gc2235_acpi_match[] = {
	{ "INT33F8" },
	{},
};

MODULE_DEVICE_TABLE(acpi, gc2235_acpi_match);
MODULE_DEVICE_TABLE(i2c, gc2235_id);

static struct i2c_driver gc2235_driver = {
	.driver = {
		.name = GC2235_NAME,
		.acpi_match_table = ACPI_PTR(gc2235_acpi_match),
		.name = "gc2235",
		.acpi_match_table = gc2235_acpi_match,
	},
	.probe = gc2235_probe,
	.probe_new = gc2235_probe,
	.remove = gc2235_remove,
	.id_table = gc2235_id,
};
module_i2c_driver(gc2235_driver);

+4 −14
Original line number Diff line number Diff line
@@ -862,8 +862,7 @@ static void *lm3554_platform_data_func(struct i2c_client *client)
	return &platform_data;
}

static int lm3554_probe(struct i2c_client *client,
				  const struct i2c_device_id *id)
static int lm3554_probe(struct i2c_client *client)
{
	int err = 0;
	struct lm3554 *flash;
@@ -960,13 +959,6 @@ static int lm3554_remove(struct i2c_client *client)
	return ret;
}

static const struct i2c_device_id lm3554_id[] = {
	{LM3554_NAME, 0},
	{},
};

MODULE_DEVICE_TABLE(i2c, lm3554_id);

static const struct dev_pm_ops lm3554_pm_ops = {
	.suspend = lm3554_suspend,
	.resume = lm3554_resume,
@@ -976,18 +968,16 @@ static const struct acpi_device_id lm3554_acpi_match[] = {
	{ "INTCF1C" },
	{},
};

MODULE_DEVICE_TABLE(acpi, lm3554_acpi_match);

static struct i2c_driver lm3554_driver = {
	.driver = {
		.name = LM3554_NAME,
		.name = "lm3554",
		.pm   = &lm3554_pm_ops,
		.acpi_match_table = ACPI_PTR(lm3554_acpi_match),
		.acpi_match_table = lm3554_acpi_match,
	},
	.probe = lm3554_probe,
	.probe_new = lm3554_probe,
	.remove = lm3554_remove,
	.id_table = lm3554_id,
};
module_i2c_driver(lm3554_driver);

+3 −8
Original line number Diff line number Diff line
@@ -1853,8 +1853,7 @@ static int mt9m114_remove(struct i2c_client *client)
	return 0;
}

static int mt9m114_probe(struct i2c_client *client,
		       const struct i2c_device_id *id)
static int mt9m114_probe(struct i2c_client *client)
{
	struct mt9m114_device *dev;
	int ret = 0;
@@ -1924,24 +1923,20 @@ static int mt9m114_probe(struct i2c_client *client,
	return 0;
}

MODULE_DEVICE_TABLE(i2c, mt9m114_id);

static const struct acpi_device_id mt9m114_acpi_match[] = {
	{ "INT33F0" },
	{ "CRMT1040" },
	{},
};

MODULE_DEVICE_TABLE(acpi, mt9m114_acpi_match);

static struct i2c_driver mt9m114_driver = {
	.driver = {
		.name = "mt9m114",
		.acpi_match_table = ACPI_PTR(mt9m114_acpi_match),
		.acpi_match_table = mt9m114_acpi_match,
	},
	.probe = mt9m114_probe,
	.probe_new = mt9m114_probe,
	.remove = mt9m114_remove,
	.id_table = mt9m114_id,
};
module_i2c_driver(mt9m114_driver);

Loading