media: imx274: don't hard-code the subdev name to DRIVER_NAME
authorLuca Ceresoli <luca@lucaceresoli.net>
Fri, 24 Aug 2018 16:35:21 +0000 (12:35 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 17 Sep 2018 19:11:38 +0000 (15:11 -0400)
Forcibly setting the subdev name to DRIVER_NAME (i.e. "IMX274") makes
it non-unique and less informative.

Let the driver use the default name from i2c, e.g. "IMX274 2-001a".

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/imx274.c

index 06757f0..5707066 100644 (file)
@@ -1885,7 +1885,6 @@ static int imx274_probe(struct i2c_client *client,
        imx274->client = client;
        sd = &imx274->sd;
        v4l2_i2c_subdev_init(sd, client, &imx274_subdev_ops);
-       strscpy(sd->name, DRIVER_NAME, sizeof(sd->name));
        sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
 
        /* initialize subdev media pad */