linux-2.6.33/platform_device_alloc()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#oe2104c4]
#backlinks
*説明 [#qd3959b0]
-パス: [[linux-2.6.33/drivers/base/platform.c]]
-FIXME: これは何?
--説明
**引数 [#de7cb644]
-const char *name
--
-int id
--
**返り値 [#ic416a90]
-struct platform_device *
--
--[[linux-2.6.33/platform_device]]
**参考 [#wf0661e2]
*実装 [#lfea1fc4]
/**
* platform_device_alloc
* @name: base name of the device we're adding
* @id: instance id
*
* Create a platform device object which can have other ...
* to it, and which will have attached objects freed whe...
*/
struct platform_device *platform_device_alloc(const char...
{
struct platform_object *pa;
-
--[[linux-2.6.33/platform_object]]
pa = kzalloc(sizeof(struct platform_object) + strlen(na...
-
--[[linux-2.6.33/kzalloc()]]
-
--[[linux-2.6.33/GFP_KERNEL]]
if (pa) {
strcpy(pa->name, name);
pa->pdev.name = pa->name;
pa->pdev.id = id;
device_initialize(&pa->pdev.dev);
pa->pdev.dev.release = platform_device_release;
}
-
--[[linux-2.6.33/device_initialize()]]
-
--[[linux-2.6.33/platform_device_release()]]
return pa ? &pa->pdev : NULL;
}
EXPORT_SYMBOL_GPL(platform_device_alloc);
-GPL のモジュールにのみシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL_GPL()]]
*コメント [#t5b61f30]
終了行:
*参照元 [#oe2104c4]
#backlinks
*説明 [#qd3959b0]
-パス: [[linux-2.6.33/drivers/base/platform.c]]
-FIXME: これは何?
--説明
**引数 [#de7cb644]
-const char *name
--
-int id
--
**返り値 [#ic416a90]
-struct platform_device *
--
--[[linux-2.6.33/platform_device]]
**参考 [#wf0661e2]
*実装 [#lfea1fc4]
/**
* platform_device_alloc
* @name: base name of the device we're adding
* @id: instance id
*
* Create a platform device object which can have other ...
* to it, and which will have attached objects freed whe...
*/
struct platform_device *platform_device_alloc(const char...
{
struct platform_object *pa;
-
--[[linux-2.6.33/platform_object]]
pa = kzalloc(sizeof(struct platform_object) + strlen(na...
-
--[[linux-2.6.33/kzalloc()]]
-
--[[linux-2.6.33/GFP_KERNEL]]
if (pa) {
strcpy(pa->name, name);
pa->pdev.name = pa->name;
pa->pdev.id = id;
device_initialize(&pa->pdev.dev);
pa->pdev.dev.release = platform_device_release;
}
-
--[[linux-2.6.33/device_initialize()]]
-
--[[linux-2.6.33/platform_device_release()]]
return pa ? &pa->pdev : NULL;
}
EXPORT_SYMBOL_GPL(platform_device_alloc);
-GPL のモジュールにのみシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL_GPL()]]
*コメント [#t5b61f30]
ページ名: