 +	struct i2c_client *client = v4l2_get_subdevdata(sd);
 +	struct ov10635_priv *priv = to_ov10635(client);
 +
-+	return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x\n",
-+			priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4]);
-+}
-+
-+static DEVICE_ATTR(otp_id, S_IRUGO, ov10635_otp_id_show, NULL);
++	return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n",
++			priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]);
++}
++
++static DEVICE_ATTR(otp_id_ov10635, S_IRUGO, ov10635_otp_id_show, NULL);
 +
 +static int ov10635_initialize(struct i2c_client *client)
 +{

+	int				height;
+	int				fps_denominator;
+	int				init_complete;
+	u8				id[5];
+};
+
+static inline struct ov10635_priv *to_ov10635(const struct i2c_client *client)

+{
+	struct ov10635_priv *priv = i2c_get_clientdata(client);
+
+	device_remove_file(&client->dev, &dev_attr_otp_id_ov10635);
+	v4l2_async_unregister_subdev(&priv->sd);
+	media_entity_cleanup(&priv->sd.entity);
+	v4l2_ctrl_handler_free(&priv->hdl);
