diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2014-03-26 20:34:29 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-23 18:11:43 +0400 |
commit | 3c9e7ea37709572755d3aea2ebdd453b187741ab (patch) | |
tree | c0fe45df106f6d50f3d32c60b3cb3abd86a0062d /drivers/media/i2c | |
parent | 125a1c069651fd470f457aa95256903e195b176d (diff) | |
download | linux-3c9e7ea37709572755d3aea2ebdd453b187741ab.tar.xz |
[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 <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 8741cae9c9f2..69c11ec938fd 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; |