[media] bttv-driver, usbvision-video: use to_video_device()
Use to_video_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
此提交包含在:
@@ -186,7 +186,7 @@ MODULE_VERSION(BTTV_VERSION);
|
||||
static ssize_t show_card(struct device *cd,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct video_device *vfd = container_of(cd, struct video_device, dev);
|
||||
struct video_device *vfd = to_video_device(cd);
|
||||
struct bttv *btv = video_get_drvdata(vfd);
|
||||
return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET);
|
||||
}
|
||||
|
新增問題並參考
封鎖使用者