提交 3c9e7ea3 编写于 作者: S Sakari Ailus 提交者: Mauro Carvalho Chehab

[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: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 125a1c06
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册