Merge commit 'v2.6.39-rc3' into for-2.6.39
[pandora-kernel.git] / drivers / media / video / tcm825x.c
index b30c492..b6ee1bd 100644 (file)
@@ -493,7 +493,7 @@ static int ioctl_g_ctrl(struct v4l2_int_device *s,
        int val, r;
        struct vcontrol *lvc;
 
-       /* exposure time is special, spread accross 2 registers */
+       /* exposure time is special, spread across 2 registers */
        if (vc->id == V4L2_CID_EXPOSURE) {
                int val_lower, val_upper;
 
@@ -538,7 +538,7 @@ static int ioctl_s_ctrl(struct v4l2_int_device *s,
        struct vcontrol *lvc;
        int val = vc->value;
 
-       /* exposure time is special, spread accross 2 registers */
+       /* exposure time is special, spread across 2 registers */
        if (vc->id == V4L2_CID_EXPOSURE) {
                int val_lower, val_upper;
                val_lower = val & TCM825X_MASK(TCM825X_ESRSPD_L);
@@ -850,7 +850,6 @@ static int tcm825x_probe(struct i2c_client *client,
                         const struct i2c_device_id *did)
 {
        struct tcm825x_sensor *sensor = &tcm825x;
-       int rval;
 
        if (i2c_get_clientdata(client))
                return -EBUSY;
@@ -871,14 +870,10 @@ static int tcm825x_probe(struct i2c_client *client,
        sensor->pix.height = tcm825x_sizes[QVGA].height;
        sensor->pix.pixelformat = V4L2_PIX_FMT_RGB565;
 
-       rval = v4l2_int_device_register(sensor->v4l2_int_device);
-       if (rval)
-               i2c_set_clientdata(client, NULL);
-
-       return rval;
+       return v4l2_int_device_register(sensor->v4l2_int_device);
 }
 
-static int __exit tcm825x_remove(struct i2c_client *client)
+static int tcm825x_remove(struct i2c_client *client)
 {
        struct tcm825x_sensor *sensor = i2c_get_clientdata(client);
 
@@ -886,7 +881,6 @@ static int __exit tcm825x_remove(struct i2c_client *client)
                return -ENODEV; /* our client isn't attached */
 
        v4l2_int_device_unregister(sensor->v4l2_int_device);
-       i2c_set_clientdata(client, NULL);
 
        return 0;
 }
@@ -902,7 +896,7 @@ static struct i2c_driver tcm825x_i2c_driver = {
                .name = TCM825X_NAME,
        },
        .probe  = tcm825x_probe,
-       .remove = __exit_p(tcm825x_remove),
+       .remove = tcm825x_remove,
        .id_table = tcm825x_id,
 };