--- zzzz-none-000/linux-3.10.107/drivers/media/i2c/sony-btf-mpx.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/i2c/sony-btf-mpx.c 2021-02-04 17:41:59.000000000 +0000 @@ -30,7 +30,7 @@ static int debug; module_param(debug, int, 0644); -MODULE_PARM_DESC(debug, "debug level 0=off(default) 1=on\n"); +MODULE_PARM_DESC(debug, "debug level 0=off(default) 1=on"); /* #define MPX_DEBUG */ @@ -327,18 +327,18 @@ /* --------------------------------------------------------------------------*/ -static const struct v4l2_subdev_core_ops sony_btf_mpx_core_ops = { - .s_std = sony_btf_mpx_s_std, -}; - static const struct v4l2_subdev_tuner_ops sony_btf_mpx_tuner_ops = { .s_tuner = sony_btf_mpx_s_tuner, .g_tuner = sony_btf_mpx_g_tuner, }; +static const struct v4l2_subdev_video_ops sony_btf_mpx_video_ops = { + .s_std = sony_btf_mpx_s_std, +}; + static const struct v4l2_subdev_ops sony_btf_mpx_ops = { - .core = &sony_btf_mpx_core_ops, .tuner = &sony_btf_mpx_tuner_ops, + .video = &sony_btf_mpx_video_ops, }; /* --------------------------------------------------------------------------*/ @@ -355,7 +355,7 @@ v4l_info(client, "chip found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); - t = kzalloc(sizeof(struct sony_btf_mpx), GFP_KERNEL); + t = devm_kzalloc(&client->dev, sizeof(*t), GFP_KERNEL); if (t == NULL) return -ENOMEM; @@ -374,7 +374,6 @@ struct v4l2_subdev *sd = i2c_get_clientdata(client); v4l2_device_unregister_subdev(sd); - kfree(to_state(sd)); return 0; } @@ -389,7 +388,6 @@ static struct i2c_driver sony_btf_mpx_driver = { .driver = { - .owner = THIS_MODULE, .name = "sony-btf-mpx", }, .probe = sony_btf_mpx_probe,