X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fmedia%2Fi2c%2Fadv7170.c;h=04bb29720aaf1c7bae4410cbb8f0b608394d0231;hb=9bf12df31f282e845b3dfaac1e5d5376a041da22;hp=6bc01fb98ff8bfad5c7c6e173d78f6151b6b3277;hpb=0074120228496d6fceb75ba17d21dc0b7476f8c4;p=~andy%2Flinux diff --git a/drivers/media/i2c/adv7170.c b/drivers/media/i2c/adv7170.c index 6bc01fb98ff..04bb29720aa 100644 --- a/drivers/media/i2c/adv7170.c +++ b/drivers/media/i2c/adv7170.c @@ -36,7 +36,6 @@ #include #include #include -#include MODULE_DESCRIPTION("Analog Devices ADV7170 video encoder driver"); MODULE_AUTHOR("Maxim Yevtyushkin"); @@ -317,19 +316,8 @@ static int adv7170_s_fmt(struct v4l2_subdev *sd, return ret; } -static int adv7170_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip) -{ - struct i2c_client *client = v4l2_get_subdevdata(sd); - - return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7170, 0); -} - /* ----------------------------------------------------------------------- */ -static const struct v4l2_subdev_core_ops adv7170_core_ops = { - .g_chip_ident = adv7170_g_chip_ident, -}; - static const struct v4l2_subdev_video_ops adv7170_video_ops = { .s_std_output = adv7170_s_std_output, .s_routing = adv7170_s_routing, @@ -339,7 +327,6 @@ static const struct v4l2_subdev_video_ops adv7170_video_ops = { }; static const struct v4l2_subdev_ops adv7170_ops = { - .core = &adv7170_core_ops, .video = &adv7170_video_ops, }; @@ -359,7 +346,7 @@ static int adv7170_probe(struct i2c_client *client, v4l_info(client, "chip found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); - encoder = kzalloc(sizeof(struct adv7170), GFP_KERNEL); + encoder = devm_kzalloc(&client->dev, sizeof(*encoder), GFP_KERNEL); if (encoder == NULL) return -ENOMEM; sd = &encoder->sd; @@ -384,7 +371,6 @@ static int adv7170_remove(struct i2c_client *client) struct v4l2_subdev *sd = i2c_get_clientdata(client); v4l2_device_unregister_subdev(sd); - kfree(to_adv7170(sd)); return 0; }