Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1690721 commit dfde3d6Copy full SHA for dfde3d6
drivers/staging/media/max96712/max96712.c
@@ -402,7 +402,6 @@ static int max96712_probe(struct i2c_client *client)
402
return -ENOMEM;
403
404
priv->client = client;
405
- i2c_set_clientdata(client, priv);
406
407
priv->regmap = devm_regmap_init_i2c(client, &max96712_i2c_regmap);
408
if (IS_ERR(priv->regmap))
@@ -435,7 +434,8 @@ static int max96712_probe(struct i2c_client *client)
435
434
436
static void max96712_remove(struct i2c_client *client)
437
{
438
- struct max96712_priv *priv = i2c_get_clientdata(client);
+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
+ struct max96712_priv *priv = container_of(sd, struct max96712_priv, sd);
439
440
v4l2_async_unregister_subdev(&priv->sd);
441
0 commit comments