您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ to_video_device函数代码示例

51自学网 2021-06-03 08:54:51
  C++
这篇教程C++ to_video_device函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中to_video_device函数的典型用法代码示例。如果您正苦于以下问题:C++ to_video_device函数的具体用法?C++ to_video_device怎么用?C++ to_video_device使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了to_video_device函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: show_name

static ssize_t show_name(struct device *cd,			 struct device_attribute *attr, char *buf){	struct video_device *vdev = to_video_device(cd);	return sprintf(buf, "%.*s/n", (int)sizeof(vdev->name), vdev->name);}
开发者ID:Kratos1982,项目名称:UbuntuTouch,代码行数:7,


示例2: show_debug

static ssize_t show_debug(struct device *cd,			 struct device_attribute *attr, char *buf){	struct video_device *vdev = to_video_device(cd);	return sprintf(buf, "%i/n", vdev->debug);}
开发者ID:Kratos1982,项目名称:UbuntuTouch,代码行数:7,


示例3: index_show

static ssize_t index_show(struct device *cd,			  struct device_attribute *attr, char *buf){	struct video_device *vdev = to_video_device(cd);	return sprintf(buf, "%i/n", vdev->index);}
开发者ID:AshishNamdev,项目名称:linux,代码行数:7,


示例4: v4l2_device_release

/* Called when the last user of the video device exits. */static void v4l2_device_release(struct device *cd){    struct video_device *vdev = to_video_device(cd);    struct v4l2_device *v4l2_dev = vdev->v4l2_dev;    mutex_lock(&videodev_lock);    if (video_device[vdev->minor] != vdev) {        mutex_unlock(&videodev_lock);        /* should not happen */        WARN_ON(1);        return;    }    /* Free up this device for reuse */    video_device[vdev->minor] = NULL;    /* Delete the cdev on this minor as well */    cdev_del(vdev->cdev);    /* Just in case some driver tries to access this from       the release() callback. */    vdev->cdev = NULL;    /* Mark device node number as free */    devnode_clear(vdev);    mutex_unlock(&videodev_lock);    /* Release video_device and perform other       cleanups as needed. */    vdev->release(vdev);    /* Decrease v4l2_device refcount */    if (v4l2_dev)        v4l2_device_put(v4l2_dev);}
开发者ID:n3ocort3x,项目名称:one_x_2.6,代码行数:36,


示例5: v4l2_device_release

/* Called when the last user of the video device exits. */static void v4l2_device_release(struct device *cd){	struct video_device *vdev = to_video_device(cd);	struct v4l2_device *v4l2_dev = vdev->v4l2_dev;	mutex_lock(&videodev_lock);	if (WARN_ON(video_device[vdev->minor] != vdev)) {		/* should not happen */		mutex_unlock(&videodev_lock);		return;	}	/* Free up this device for reuse */	video_device[vdev->minor] = NULL;	/* Delete the cdev on this minor as well */	cdev_del(vdev->cdev);	/* Just in case some driver tries to access this from	   the release() callback. */	vdev->cdev = NULL;	/* Mark device node number as free */	devnode_clear(vdev);	mutex_unlock(&videodev_lock);#if defined(CONFIG_MEDIA_CONTROLLER)	if (v4l2_dev->mdev) {		/* Remove interfaces and interface links */		media_devnode_remove(vdev->intf_devnode);		if (vdev->entity.function != MEDIA_ENT_F_UNKNOWN)			media_device_unregister_entity(&vdev->entity);	}#endif	/* Do not call v4l2_device_put if there is no release callback set.	 * Drivers that have no v4l2_device release callback might free the	 * v4l2_dev instance in the video_device release callback below, so we	 * must perform this check here.	 *	 * TODO: In the long run all drivers that use v4l2_device should use the	 * v4l2_device release callback. This check will then be unnecessary.	 */	if (v4l2_dev->release == NULL)		v4l2_dev = NULL;	/* Release video_device and perform other	   cleanups as needed. */	vdev->release(vdev);	/* Decrease v4l2_device refcount */	if (v4l2_dev)		v4l2_device_put(v4l2_dev);}
开发者ID:AshishNamdev,项目名称:linux,代码行数:55,


示例6: debug_store

static ssize_t debug_store(struct device *cd, struct device_attribute *attr,			  const char *buf, size_t len){	struct video_device *vdev = to_video_device(cd);	int res = 0;	u16 value;	res = kstrtou16(buf, 0, &value);	if (res)		return res;	vdev->debug = value;	return len;}
开发者ID:adbensi,项目名称:kernel-odroidc-3.10.80-rt102,代码行数:14,


示例7: v4l2_device_release

/* Called when the last user of the video device exits. */static void v4l2_device_release(struct device *cd){	struct video_device *vdev = to_video_device(cd);	struct v4l2_device *v4l2_dev = vdev->v4l2_dev;	mutex_lock(&videodev_lock);	if (video_device[vdev->minor] != vdev) {		mutex_unlock(&videodev_lock);		/* should not happen */		WARN_ON(1);		return;	}	/* Free up this device for reuse */	video_device[vdev->minor] = NULL;	/* Delete the cdev on this minor as well */	cdev_del(vdev->cdev);	/* Just in case some driver tries to access this from	   the release() callback. */	vdev->cdev = NULL;	/* Mark device node number as free */	devnode_clear(vdev);	mutex_unlock(&videodev_lock);#if defined(CONFIG_MEDIA_CONTROLLER)	if (vdev->v4l2_dev && vdev->v4l2_dev->mdev &&	    vdev->vfl_type != VFL_TYPE_SUBDEV)		media_device_unregister_entity(&vdev->entity);#endif	/* Release video_device and perform other	   cleanups as needed. */	vdev->release(vdev);	/* Decrease v4l2_device refcount */	if (v4l2_dev)		v4l2_device_put(v4l2_dev);}
开发者ID:gcloudspider,项目名称:linux-tbs-drivers,代码行数:42,



注:本文中的to_video_device函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ to_wide_string函数代码示例
C++ to_vector函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。