linux-4.4.1/cdev_init()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#ie0912cc]
#backlinks
*説明 [#nef3ef84]
-パス: [[linux-4.4.1/fs/char_dev.c]]
-FIXME: これは何?
--説明
**引数 [#q5fa836a]
-struct cdev *cdev
--
--[[linux-4.4.1/cdev]]
-const struct file_operations *fops
--
--[[linux-4.4.1/file_operations]]
**返り値 [#n3d1b6ee]
-なし
**参考 [#tc59e161]
*実装 [#m14358b6]
/**
* cdev_init() - initialize a cdev structure
* @cdev: the structure to initialize
* @fops: the file_operations for this device
*
* Initializes @cdev, remembering @fops, making it ready...
* system with cdev_add().
*/
void cdev_init(struct cdev *cdev, const struct file_oper...
{
memset(cdev, 0, sizeof *cdev);
INIT_LIST_HEAD(&cdev->list);
kobject_init(&cdev->kobj, &ktype_cdev_default);
cdev->ops = fops;
-
--[[linux-4.4.1/memset()]]
--[[linux-4.4.1/INIT_LIST_HEAD()]]
--[[linux-4.4.1/kobject_init()]]
--[[linux-4.4.1/ktype_cdev_default()]]
}
...
EXPORT_SYMBOL(cdev_init);
-
--[[linux-4.4.1/EXPORT_SYMBOL()]]
*コメント [#c962b621]
終了行:
*参照元 [#ie0912cc]
#backlinks
*説明 [#nef3ef84]
-パス: [[linux-4.4.1/fs/char_dev.c]]
-FIXME: これは何?
--説明
**引数 [#q5fa836a]
-struct cdev *cdev
--
--[[linux-4.4.1/cdev]]
-const struct file_operations *fops
--
--[[linux-4.4.1/file_operations]]
**返り値 [#n3d1b6ee]
-なし
**参考 [#tc59e161]
*実装 [#m14358b6]
/**
* cdev_init() - initialize a cdev structure
* @cdev: the structure to initialize
* @fops: the file_operations for this device
*
* Initializes @cdev, remembering @fops, making it ready...
* system with cdev_add().
*/
void cdev_init(struct cdev *cdev, const struct file_oper...
{
memset(cdev, 0, sizeof *cdev);
INIT_LIST_HEAD(&cdev->list);
kobject_init(&cdev->kobj, &ktype_cdev_default);
cdev->ops = fops;
-
--[[linux-4.4.1/memset()]]
--[[linux-4.4.1/INIT_LIST_HEAD()]]
--[[linux-4.4.1/kobject_init()]]
--[[linux-4.4.1/ktype_cdev_default()]]
}
...
EXPORT_SYMBOL(cdev_init);
-
--[[linux-4.4.1/EXPORT_SYMBOL()]]
*コメント [#c962b621]
ページ名: