[media] m5mols: Make subdev name independent of the I2C slave address
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 17 Feb 2012 18:58:53 +0000 (15:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 8 Mar 2012 10:44:46 +0000 (07:44 -0300)
Initialize the subdev name properly so it doesn't have an I2C
bus and slave address appended to it.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/m5mols/m5mols_core.c

index 93d768db9f3328b152bf8f1a98329fc475c11d2d..e631d0d77ce188e0b4aa4026a7b8a2bcbe85cb38 100644 (file)
@@ -982,8 +982,8 @@ static int __devinit m5mols_probe(struct i2c_client *client,
        }
 
        sd = &info->sd;
-       strlcpy(sd->name, MODULE_NAME, sizeof(sd->name));
        v4l2_i2c_subdev_init(sd, client, &m5mols_ops);
+       strlcpy(sd->name, MODULE_NAME, sizeof(sd->name));
        sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
        sd->internal_ops = &m5mols_subdev_internal_ops;