We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77ed247 commit ee1b504Copy full SHA for ee1b504
drivers/staging/media/max96712/max96712.c
@@ -418,7 +418,6 @@ static int max96712_probe(struct i2c_client *client)
418
priv->info = of_device_get_match_data(&client->dev);
419
420
priv->client = client;
421
- i2c_set_clientdata(client, priv);
422
423
priv->regmap = devm_regmap_init_i2c(client, &max96712_i2c_regmap);
424
if (IS_ERR(priv->regmap))
@@ -448,7 +447,8 @@ static int max96712_probe(struct i2c_client *client)
448
447
449
static void max96712_remove(struct i2c_client *client)
450
{
451
- 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);
452
453
v4l2_async_unregister_subdev(&priv->sd);
454
0 commit comments