Commit e6714993 authored by Kieran Bingham's avatar Kieran Bingham Committed by Mauro Carvalho Chehab
Browse files

media: i2c: Convert to new i2c device probe()



The I2C core framework provides a simplified probe framework from commit
b8a1a4cd ("i2c: Provide a temporary .probe_new() call-back type").

These drivers do not utilise the i2c_device_id table in the probe, so we
can easily convert them to utilise the simplified i2c driver
registration.

Signed-off-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Acked-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Reviewed-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent bec5352d
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -428,8 +428,7 @@ adv7343_get_pdata(struct i2c_client *client)
	return pdata;
}

static int adv7343_probe(struct i2c_client *client,
				const struct i2c_device_id *id)
static int adv7343_probe(struct i2c_client *client)
{
	struct adv7343_state *state;
	int err;
@@ -524,7 +523,7 @@ static struct i2c_driver adv7343_driver = {
		.of_match_table = of_match_ptr(adv7343_of_match),
		.name	= "adv7343",
	},
	.probe		= adv7343_probe,
	.probe_new	= adv7343_probe,
	.remove		= adv7343_remove,
	.id_table	= adv7343_id,
};
+2 −3
Original line number Diff line number Diff line
@@ -1821,8 +1821,7 @@ static const struct i2c_device_id imx274_id[] = {
};
MODULE_DEVICE_TABLE(i2c, imx274_id);

static int imx274_probe(struct i2c_client *client,
			const struct i2c_device_id *id)
static int imx274_probe(struct i2c_client *client)
{
	struct v4l2_subdev *sd;
	struct stimx274 *imx274;
@@ -1984,7 +1983,7 @@ static struct i2c_driver imx274_i2c_driver = {
		.name	= DRIVER_NAME,
		.of_match_table	= imx274_of_id_table,
	},
	.probe		= imx274_probe,
	.probe_new	= imx274_probe,
	.remove		= imx274_remove,
	.id_table	= imx274_id,
};
+2 −3
Original line number Diff line number Diff line
@@ -1271,8 +1271,7 @@ static int max2175_refout_load_to_bits(struct i2c_client *client, u32 load,
	return 0;
}

static int max2175_probe(struct i2c_client *client,
			const struct i2c_device_id *id)
static int max2175_probe(struct i2c_client *client)
{
	bool master = true, am_hiz = false;
	u32 refout_load, refout_bits = 0;	/* REFOUT disabled */
@@ -1433,7 +1432,7 @@ static struct i2c_driver max2175_driver = {
		.name	= DRIVER_NAME,
		.of_match_table = max2175_of_ids,
	},
	.probe		= max2175_probe,
	.probe_new	= max2175_probe,
	.remove		= max2175_remove,
	.id_table	= max2175_id,
};
+2 −3
Original line number Diff line number Diff line
@@ -726,8 +726,7 @@ static const struct v4l2_subdev_ops mt9m001_subdev_ops = {
	.pad	= &mt9m001_subdev_pad_ops,
};

static int mt9m001_probe(struct i2c_client *client,
			 const struct i2c_device_id *did)
static int mt9m001_probe(struct i2c_client *client)
{
	struct mt9m001 *mt9m001;
	struct i2c_adapter *adapter = client->adapter;
@@ -872,7 +871,7 @@ static struct i2c_driver mt9m001_i2c_driver = {
		.pm = &mt9m001_pm_ops,
		.of_match_table = mt9m001_of_match,
	},
	.probe		= mt9m001_probe,
	.probe_new	= mt9m001_probe,
	.remove		= mt9m001_remove,
	.id_table	= mt9m001_id,
};
+2 −3
Original line number Diff line number Diff line
@@ -1243,8 +1243,7 @@ static int mt9m111_probe_fw(struct i2c_client *client, struct mt9m111 *mt9m111)
	return ret;
}

static int mt9m111_probe(struct i2c_client *client,
			 const struct i2c_device_id *did)
static int mt9m111_probe(struct i2c_client *client)
{
	struct mt9m111 *mt9m111;
	struct i2c_adapter *adapter = client->adapter;
@@ -1388,7 +1387,7 @@ static struct i2c_driver mt9m111_i2c_driver = {
		.name = "mt9m111",
		.of_match_table = of_match_ptr(mt9m111_of_match),
	},
	.probe		= mt9m111_probe,
	.probe_new	= mt9m111_probe,
	.remove		= mt9m111_remove,
	.id_table	= mt9m111_id,
};
Loading