diff mbox

[2/2] ov9640: fix OmniVision OV9640 sensor driver's I2C remove function

Message ID 1291412898-9939-3-git-send-email-dacohen@gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

David Cohen Dec. 3, 2010, 9:48 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/ov9640.c b/drivers/media/video/ov9640.c
index c6d8e8a..7628754 100644
--- a/drivers/media/video/ov9640.c
+++ b/drivers/media/video/ov9640.c
@@ -788,7 +788,8 @@  static int ov9640_probe(struct i2c_client *client,
 
 static int ov9640_remove(struct i2c_client *client)
 {
-	struct ov9640_priv *priv = i2c_get_clientdata(client);
+	struct v4l2_subdev *sd = i2c_get_clientdata(client);
+	struct ov9640_priv *priv = to_ov9640_sensor(sd);
 
 	kfree(priv);
 	return 0;