linux-2.6.33/cdev_init()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#na49373e]
#backlinks
*説明 [#q00ee31e]
-パス: [[linux-2.6.33/fs/char_dev.c]]
-FIXME: これは何?
--説明
**引数 [#o27b2d73]
-struct cdev *cdev
--
--[[linux-2.6.33/cdev]]
-const struct file_operations *fops
--
--[[linux-2.6.33/file_operations]]
**返り値 [#xb3ce2aa]
-なし
**参考 [#za0590c9]
*実装 [#u3d1d537]
/**
* 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);
-
--[[linux-2.6.33/memset()]]
INIT_LIST_HEAD(&cdev->list);
-
--[[linux-2.6.33/INIT_LIST_HEAD()]]
kobject_init(&cdev->kobj, &ktype_cdev_default);
-
--[[linux-2.6.33/kobject_init()]]
--[[linux-2.6.33/ktype_cdev_default(global)]]
cdev->ops = fops;
}
*コメント [#nb70b9d0]
終了行:
*参照元 [#na49373e]
#backlinks
*説明 [#q00ee31e]
-パス: [[linux-2.6.33/fs/char_dev.c]]
-FIXME: これは何?
--説明
**引数 [#o27b2d73]
-struct cdev *cdev
--
--[[linux-2.6.33/cdev]]
-const struct file_operations *fops
--
--[[linux-2.6.33/file_operations]]
**返り値 [#xb3ce2aa]
-なし
**参考 [#za0590c9]
*実装 [#u3d1d537]
/**
* 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);
-
--[[linux-2.6.33/memset()]]
INIT_LIST_HEAD(&cdev->list);
-
--[[linux-2.6.33/INIT_LIST_HEAD()]]
kobject_init(&cdev->kobj, &ktype_cdev_default);
-
--[[linux-2.6.33/kobject_init()]]
--[[linux-2.6.33/ktype_cdev_default(global)]]
cdev->ops = fops;
}
*コメント [#nb70b9d0]
ページ名: