summaryrefslogtreecommitdiff
path: root/drivers/staging/media/atomisp/i2c/ov8858.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-09-27 14:24:59 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-10-31 06:19:45 -0400
commite19c92059a700453a304061ff4291dfc2de2902b (patch)
tree92308a22206e76ddcf49c5d5ebafbc7c89f486f6 /drivers/staging/media/atomisp/i2c/ov8858.c
parent2cb63c4cf56fbe1a6dcc52595885eb2692a7df01 (diff)
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media/atomisp/i2c/ov8858.c')
-rw-r--r--drivers/staging/media/atomisp/i2c/ov8858.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/staging/media/atomisp/i2c/ov8858.c b/drivers/staging/media/atomisp/i2c/ov8858.c
index 3ea157c7ee03..10383b8b6ecb 100644
--- a/drivers/staging/media/atomisp/i2c/ov8858.c
+++ b/drivers/staging/media/atomisp/i2c/ov8858.c
@@ -2080,8 +2080,7 @@ static const struct v4l2_ctrl_config ctrls[] = {
}
};
-static int ov8858_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int ov8858_probe(struct i2c_client *client)
{
struct ov8858_device *dev;
unsigned int i;
@@ -2097,8 +2096,6 @@ static int ov8858_probe(struct i2c_client *client,
mutex_init(&dev->input_lock);
- if (id)
- dev->i2c_id = id->driver_data;
dev->fmt_idx = 0;
dev->sensor_id = OV_ID_DEFAULT;
dev->vcm_driver = &ov8858_vcms[OV8858_ID_DEFAULT];
@@ -2178,26 +2175,19 @@ out_free:
return ret;
}
-static const struct i2c_device_id ov8858_id[] = {
- {OV8858_NAME, 0},
- {}
-};
-
-MODULE_DEVICE_TABLE(i2c, ov8858_id);
-
static const struct acpi_device_id ov8858_acpi_match[] = {
{"INT3477"},
{},
};
+MODULE_DEVICE_TABLE(acpi, ov8858_acpi_match);
static struct i2c_driver ov8858_driver = {
.driver = {
- .name = OV8858_NAME,
- .acpi_match_table = ACPI_PTR(ov8858_acpi_match),
+ .name = "ov8858",
+ .acpi_match_table = ov8858_acpi_match,
},
- .probe = ov8858_probe,
+ .probe_new = ov8858_probe,
.remove = ov8858_remove,
- .id_table = ov8858_id,
};
module_i2c_driver(ov8858_driver);