linux-2.6.33/driver_register()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#a0f1ad0b]
#backlinks
*説明 [#c3adabd6]
-パス: [[linux-2.6.33/drivers/base/driver.c]]
-FIXME: これは何?
--説明
**引数 [#n0732970]
-struct device_driver *drv
--
--[[linux-2.6.33/device_driver]]
**返り値 [#db046dea]
-int
--
**参考 [#rac81262]
*実装 [#r6fd1f9d]
/**
* driver_register - register driver with bus
* @drv: driver to register
*
* We pass off most of the work to the bus_add_driver() ...
* since most of the things we have to do deal with the ...
* structures.
*/
int driver_register(struct device_driver *drv)
{
int ret;
struct device_driver *other;
BUG_ON(!drv->bus->p);
-
--[[linux-2.6.33/BUG_ON()]]
if ((drv->bus->probe && drv->probe) ||
(drv->bus->remove && drv->remove) ||
(drv->bus->shutdown && drv->shutdown))
printk(KERN_WARNING "Driver '%s' needs updating - plea...
"bus_type methods\n", drv->name);
-
--[[linux-2.6.33/printk()]]
other = driver_find(drv->name, drv->bus);
if (other) {
put_driver(other);
printk(KERN_ERR "Error: Driver '%s' is already registe...
"aborting...\n", drv->name);
return -EBUSY;
}
-
--[[linux-2.6.33/driver_find()]]
-
--[[linux-2.6.33/put_driver()]]
ret = bus_add_driver(drv);
if (ret)
return ret;
-
--[[linux-2.6.33/bus_add_driver()]]
ret = driver_add_groups(drv, drv->groups);
if (ret)
bus_remove_driver(drv);
-
--[[linux-2.6.33/driver_add_groups()]]
-
--[[linux-2.6.33/bus_remove_driver()]]
return ret;
}
EXPORT_SYMBOL_GPL(driver_register);
-GPL のモジュールにのみシンボルを公開する。
--[[linux-2.6.33/]]
*コメント [#j9847f33]
終了行:
*参照元 [#a0f1ad0b]
#backlinks
*説明 [#c3adabd6]
-パス: [[linux-2.6.33/drivers/base/driver.c]]
-FIXME: これは何?
--説明
**引数 [#n0732970]
-struct device_driver *drv
--
--[[linux-2.6.33/device_driver]]
**返り値 [#db046dea]
-int
--
**参考 [#rac81262]
*実装 [#r6fd1f9d]
/**
* driver_register - register driver with bus
* @drv: driver to register
*
* We pass off most of the work to the bus_add_driver() ...
* since most of the things we have to do deal with the ...
* structures.
*/
int driver_register(struct device_driver *drv)
{
int ret;
struct device_driver *other;
BUG_ON(!drv->bus->p);
-
--[[linux-2.6.33/BUG_ON()]]
if ((drv->bus->probe && drv->probe) ||
(drv->bus->remove && drv->remove) ||
(drv->bus->shutdown && drv->shutdown))
printk(KERN_WARNING "Driver '%s' needs updating - plea...
"bus_type methods\n", drv->name);
-
--[[linux-2.6.33/printk()]]
other = driver_find(drv->name, drv->bus);
if (other) {
put_driver(other);
printk(KERN_ERR "Error: Driver '%s' is already registe...
"aborting...\n", drv->name);
return -EBUSY;
}
-
--[[linux-2.6.33/driver_find()]]
-
--[[linux-2.6.33/put_driver()]]
ret = bus_add_driver(drv);
if (ret)
return ret;
-
--[[linux-2.6.33/bus_add_driver()]]
ret = driver_add_groups(drv, drv->groups);
if (ret)
bus_remove_driver(drv);
-
--[[linux-2.6.33/driver_add_groups()]]
-
--[[linux-2.6.33/bus_remove_driver()]]
return ret;
}
EXPORT_SYMBOL_GPL(driver_register);
-GPL のモジュールにのみシンボルを公開する。
--[[linux-2.6.33/]]
*コメント [#j9847f33]
ページ名: