linux-4.4.1/v4l2_device_register()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#x3585975]
#backlinks
*説明 [#i79b42be]
-パス: [[linux-4.4.1/drivers/media/v4l2-core/v4l2-device....
-FIXME: これは何?
--説明
**引数 [#p3443a9f]
-struct device *dev
--
--[[linux-4.4.1/device]]
-struct v4l2_device *v4l2_dev
--
--[[linux-4.4.1/v4l2_device]]
**返り値 [#v6327543]
-int
--
**参考 [#j3152f28]
*実装 [#eaa632c4]
int v4l2_device_register(struct device *dev, struct v4l2...
{
if (v4l2_dev == NULL)
return -EINVAL;
INIT_LIST_HEAD(&v4l2_dev->subdevs);
spin_lock_init(&v4l2_dev->lock);
v4l2_prio_init(&v4l2_dev->prio);
kref_init(&v4l2_dev->ref);
get_device(dev);
v4l2_dev->dev = dev;
if (dev == NULL) {
/* If dev == NULL, then name must be fil...
if (WARN_ON(!v4l2_dev->name[0]))
return -EINVAL;
return 0;
}
-
--[[linux-4.4.1/INIT_LIST_HEAD()]]
--[[linux-4.4.1/spin_lock_init()]]
--[[linux-4.4.1/v4l2_prio_init()]]
--[[linux-4.4.1/kref_init()]]
--[[linux-4.4.1/get_device()]]
--[[linux-4.4.1/WARN_ON()]]
/* Set name to driver name + device name if it i...
if (!v4l2_dev->name[0])
snprintf(v4l2_dev->name, sizeof(v4l2_dev...
dev->driver->name, dev_name(dev));
if (!dev_get_drvdata(dev))
dev_set_drvdata(dev, v4l2_dev);
-
--[[linux-4.4.1/snprintf()]]
--[[linux-4.4.1/dev_name()]]
--[[linux-4.4.1/dev_get_drvdata()]]
--[[linux-4.4.1/dev_set_drvdata()]]
return 0;
}
EXPORT_SYMBOL_GPL(v4l2_device_register);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#s95d7e5b]
終了行:
*参照元 [#x3585975]
#backlinks
*説明 [#i79b42be]
-パス: [[linux-4.4.1/drivers/media/v4l2-core/v4l2-device....
-FIXME: これは何?
--説明
**引数 [#p3443a9f]
-struct device *dev
--
--[[linux-4.4.1/device]]
-struct v4l2_device *v4l2_dev
--
--[[linux-4.4.1/v4l2_device]]
**返り値 [#v6327543]
-int
--
**参考 [#j3152f28]
*実装 [#eaa632c4]
int v4l2_device_register(struct device *dev, struct v4l2...
{
if (v4l2_dev == NULL)
return -EINVAL;
INIT_LIST_HEAD(&v4l2_dev->subdevs);
spin_lock_init(&v4l2_dev->lock);
v4l2_prio_init(&v4l2_dev->prio);
kref_init(&v4l2_dev->ref);
get_device(dev);
v4l2_dev->dev = dev;
if (dev == NULL) {
/* If dev == NULL, then name must be fil...
if (WARN_ON(!v4l2_dev->name[0]))
return -EINVAL;
return 0;
}
-
--[[linux-4.4.1/INIT_LIST_HEAD()]]
--[[linux-4.4.1/spin_lock_init()]]
--[[linux-4.4.1/v4l2_prio_init()]]
--[[linux-4.4.1/kref_init()]]
--[[linux-4.4.1/get_device()]]
--[[linux-4.4.1/WARN_ON()]]
/* Set name to driver name + device name if it i...
if (!v4l2_dev->name[0])
snprintf(v4l2_dev->name, sizeof(v4l2_dev...
dev->driver->name, dev_name(dev));
if (!dev_get_drvdata(dev))
dev_set_drvdata(dev, v4l2_dev);
-
--[[linux-4.4.1/snprintf()]]
--[[linux-4.4.1/dev_name()]]
--[[linux-4.4.1/dev_get_drvdata()]]
--[[linux-4.4.1/dev_set_drvdata()]]
return 0;
}
EXPORT_SYMBOL_GPL(v4l2_device_register);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#s95d7e5b]
ページ名: