linux-2.6.33/device_initialize()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#ab922d36]
#backlinks
*説明 [#i9173700]
-パス: [[linux-2.6.33/drivers/base/core.c]]
-FIXME: これは何?
--説明
**引数 [#cfe24e3f]
-struct device *dev
--
--[[linux-2.6.33/device]]
**返り値 [#d4511099]
-なし
**参考 [#x796ccc8]
*実装 [#ida42590]
/**
* device_initialize - init device structure.
* @dev: device.
*
* This prepares the device for use by other layers by i...
* its fields.
* It is the first half of device_register(), if called by
* that function, though it can also be called separatel...
* may use @dev's fields. In particular, get_device()/pu...
* may be used for reference counting of @dev after call...
* function.
*
* NOTE: Use put_device() to give up your reference inst...
* @dev directly once you have called this function.
*/
void device_initialize(struct device *dev)
{
dev->kobj.kset = devices_kset;
-kobj は struct kobject 型
--[[linux-2.6.33/kobject]]
kobject_init(&dev->kobj, &device_ktype);
-
--[[linux-2.6.33/kobject_init()]]
INIT_LIST_HEAD(&dev->dma_pools);
-
--[[linux-2.6.33/INIT_LIST_HEAD()]]
init_MUTEX(&dev->sem);
-
--[[linux-2.6.33/init_MUTEX()]]
spin_lock_init(&dev->devres_lock);
-
--[[linux-2.6.33/spin_lock_init()]]
INIT_LIST_HEAD(&dev->devres_head);
device_init_wakeup(dev, 0);
-
--[[linux-2.6.33/device_init_wakeup()]]
device_pm_init(dev);
-
--[[linux-2.6.33/device_pm_init()]]
set_dev_node(dev, -1);
-
--[[linux-2.6.33/set_dev_node()]]
}
*コメント [#df789153]
終了行:
*参照元 [#ab922d36]
#backlinks
*説明 [#i9173700]
-パス: [[linux-2.6.33/drivers/base/core.c]]
-FIXME: これは何?
--説明
**引数 [#cfe24e3f]
-struct device *dev
--
--[[linux-2.6.33/device]]
**返り値 [#d4511099]
-なし
**参考 [#x796ccc8]
*実装 [#ida42590]
/**
* device_initialize - init device structure.
* @dev: device.
*
* This prepares the device for use by other layers by i...
* its fields.
* It is the first half of device_register(), if called by
* that function, though it can also be called separatel...
* may use @dev's fields. In particular, get_device()/pu...
* may be used for reference counting of @dev after call...
* function.
*
* NOTE: Use put_device() to give up your reference inst...
* @dev directly once you have called this function.
*/
void device_initialize(struct device *dev)
{
dev->kobj.kset = devices_kset;
-kobj は struct kobject 型
--[[linux-2.6.33/kobject]]
kobject_init(&dev->kobj, &device_ktype);
-
--[[linux-2.6.33/kobject_init()]]
INIT_LIST_HEAD(&dev->dma_pools);
-
--[[linux-2.6.33/INIT_LIST_HEAD()]]
init_MUTEX(&dev->sem);
-
--[[linux-2.6.33/init_MUTEX()]]
spin_lock_init(&dev->devres_lock);
-
--[[linux-2.6.33/spin_lock_init()]]
INIT_LIST_HEAD(&dev->devres_head);
device_init_wakeup(dev, 0);
-
--[[linux-2.6.33/device_init_wakeup()]]
device_pm_init(dev);
-
--[[linux-2.6.33/device_pm_init()]]
set_dev_node(dev, -1);
-
--[[linux-2.6.33/set_dev_node()]]
}
*コメント [#df789153]
ページ名: