We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee394db commit 32e3037Copy full SHA for 32e3037
drivers/staging/media/max96712/max96712.c
@@ -376,7 +376,6 @@ static int max96712_probe(struct i2c_client *client)
376
return -ENOMEM;
377
378
priv->client = client;
379
- i2c_set_clientdata(client, priv);
380
381
priv->regmap = devm_regmap_init_i2c(client, &max96712_i2c_regmap);
382
if (IS_ERR(priv->regmap))
@@ -409,7 +408,8 @@ static int max96712_probe(struct i2c_client *client)
409
408
410
static void max96712_remove(struct i2c_client *client)
411
{
412
- 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);
413
414
v4l2_async_unregister_subdev(&priv->sd);
415
0 commit comments