--- zzzz-none-000/linux-3.10.107/drivers/media/i2c/cs53l32a.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/i2c/cs53l32a.c 2021-02-04 17:41:59.000000000 +0000 @@ -28,7 +28,6 @@ #include #include #include -#include #include MODULE_DESCRIPTION("i2c device driver for cs53l32a Audio ADC"); @@ -104,14 +103,6 @@ return -EINVAL; } -static int cs53l32a_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_CS53l32A, 0); -} - static int cs53l32a_log_status(struct v4l2_subdev *sd) { struct cs53l32a_state *state = to_state(sd); @@ -130,7 +121,6 @@ static const struct v4l2_subdev_core_ops cs53l32a_core_ops = { .log_status = cs53l32a_log_status, - .g_chip_ident = cs53l32a_g_chip_ident, .g_ext_ctrls = v4l2_subdev_g_ext_ctrls, .try_ext_ctrls = v4l2_subdev_try_ext_ctrls, .s_ext_ctrls = v4l2_subdev_s_ext_ctrls, @@ -175,7 +165,7 @@ v4l_info(client, "chip found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); - state = kzalloc(sizeof(struct cs53l32a_state), GFP_KERNEL); + state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL); if (state == NULL) return -ENOMEM; sd = &state->sd; @@ -197,7 +187,6 @@ int err = state->hdl.error; v4l2_ctrl_handler_free(&state->hdl); - kfree(state); return err; } @@ -228,7 +217,6 @@ v4l2_device_unregister_subdev(sd); v4l2_ctrl_handler_free(&state->hdl); - kfree(state); return 0; } @@ -240,7 +228,6 @@ static struct i2c_driver cs53l32a_driver = { .driver = { - .owner = THIS_MODULE, .name = "cs53l32a", }, .probe = cs53l32a_probe,