From: Sakari Ailus Date: Wed, 26 Mar 2014 16:34:29 +0000 (-0300) Subject: upstream: [media] smiapp: Use I2C adapter ID and address in the sub-device name X-Git-Tag: submit/tizen/20141121.110247~1275 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=279fc0b8afb65339c35c6ce06b70609b5b1c9b67;p=platform%2Fkernel%2Flinux-3.10.git upstream: [media] smiapp: Use I2C adapter ID and address in the sub-device name The sub-device names should be unique. Should two identical sensors be present in the same media device they would be indistinguishable. The names will change e.g. from "vs6555 pixel array" to "vs6555 1-0010 pixel array". Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index fbd48f0..8dc7939 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2543,8 +2543,9 @@ static int smiapp_registered(struct v4l2_subdev *subdev) } snprintf(this->sd.name, - sizeof(this->sd.name), "%s %s", - sensor->minfo.name, _this->name); + sizeof(this->sd.name), "%s %d-%4.4x %s", + sensor->minfo.name, i2c_adapter_id(client->adapter), + client->addr, _this->name); this->sink_fmt.width = sensor->limits[SMIAPP_LIMIT_X_ADDR_MAX] + 1;