v4l: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: mchehab@infradead.org Cc: linux-media@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
This commit is contained in:
parent
2ead054cd2
commit
c3ef01ce4f
2 changed files with 3 additions and 2 deletions
|
@ -298,7 +298,8 @@ static int vidioc_querycap(struct file *file, void *priv,
|
||||||
|
|
||||||
strlcpy(v->driver, dev->dev.driver->name, sizeof(v->driver));
|
strlcpy(v->driver, dev->dev.driver->name, sizeof(v->driver));
|
||||||
strlcpy(v->card, dev->name, sizeof(v->card));
|
strlcpy(v->card, dev->name, sizeof(v->card));
|
||||||
snprintf(v->bus_info, sizeof(v->bus_info), "I2C:%s", dev->dev.bus_id);
|
snprintf(v->bus_info, sizeof(v->bus_info),
|
||||||
|
"I2C:%s", dev_name(&dev->dev));
|
||||||
v->version = RADIO_VERSION;
|
v->version = RADIO_VERSION;
|
||||||
v->capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO;
|
v->capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -34,7 +34,7 @@ int v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev)
|
||||||
spin_lock_init(&v4l2_dev->lock);
|
spin_lock_init(&v4l2_dev->lock);
|
||||||
v4l2_dev->dev = dev;
|
v4l2_dev->dev = dev;
|
||||||
snprintf(v4l2_dev->name, sizeof(v4l2_dev->name), "%s %s",
|
snprintf(v4l2_dev->name, sizeof(v4l2_dev->name), "%s %s",
|
||||||
dev->driver->name, dev->bus_id);
|
dev->driver->name, dev_name(dev));
|
||||||
dev_set_drvdata(dev, v4l2_dev);
|
dev_set_drvdata(dev, v4l2_dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue