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 929b698 commit 278a98fCopy full SHA for 278a98f
drivers/staging/media/max96712/max96712.c
@@ -421,7 +421,6 @@ static int max96712_probe(struct i2c_client *client)
421
return -ENOMEM;
422
423
priv->client = client;
424
- i2c_set_clientdata(client, priv);
425
426
priv->regmap = devm_regmap_init_i2c(client, &max96712_i2c_regmap);
427
if (IS_ERR(priv->regmap))
@@ -454,7 +453,8 @@ static int max96712_probe(struct i2c_client *client)
454
453
455
static void max96712_remove(struct i2c_client *client)
456
{
457
- 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);
458
459
v4l2_async_unregister_subdev(&priv->sd);
460
0 commit comments