linux-4.4.1/devm_snd_soc_register_card()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#ad45efdb]
#backlinks
*説明 [#s914007f]
-パス: [[linux-4.4.1/sound/soc/soc-devres.c]]
-FIXME: これは何?
--説明
**引数 [#ke6a4687]
-struct device *dev
--
--[[linux-4.4.1/device]]
-struct snd_soc_card *card
--
--[[linux-4.4.1/snd_soc_card]]
**返り値 [#ld50567d]
-int
--
**参考 [#f0bb8551]
*実装 [#xdf47aa6]
/**
* devm_snd_soc_register_card - resource managed card re...
* @dev: Device used to manage card
* @card: Card to register
*
* Register a card with automatic unregistration when th...
* unregistered.
*/
int devm_snd_soc_register_card(struct device *dev, struc...
{
struct snd_soc_card **ptr;
int ret;
ptr = devres_alloc(devm_card_release, sizeof(*pt...
if (!ptr)
return -ENOMEM;
-
--[[linux-4.4.1/devres_alloc()]]
--[[linux-4.4.1/GFP_KERNEL]]
ret = snd_soc_register_card(card);
if (ret == 0) {
*ptr = card;
devres_add(dev, ptr);
} else {
devres_free(ptr);
}
-
--[[linux-4.4.1/snd_soc_register_card()]]
--[[linux-4.4.1/devres_add()]]
--[[linux-4.4.1/devres_free()]]
return ret;
}
EXPORT_SYMBOL_GPL(devm_snd_soc_register_card);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#pbf28f64]
終了行:
*参照元 [#ad45efdb]
#backlinks
*説明 [#s914007f]
-パス: [[linux-4.4.1/sound/soc/soc-devres.c]]
-FIXME: これは何?
--説明
**引数 [#ke6a4687]
-struct device *dev
--
--[[linux-4.4.1/device]]
-struct snd_soc_card *card
--
--[[linux-4.4.1/snd_soc_card]]
**返り値 [#ld50567d]
-int
--
**参考 [#f0bb8551]
*実装 [#xdf47aa6]
/**
* devm_snd_soc_register_card - resource managed card re...
* @dev: Device used to manage card
* @card: Card to register
*
* Register a card with automatic unregistration when th...
* unregistered.
*/
int devm_snd_soc_register_card(struct device *dev, struc...
{
struct snd_soc_card **ptr;
int ret;
ptr = devres_alloc(devm_card_release, sizeof(*pt...
if (!ptr)
return -ENOMEM;
-
--[[linux-4.4.1/devres_alloc()]]
--[[linux-4.4.1/GFP_KERNEL]]
ret = snd_soc_register_card(card);
if (ret == 0) {
*ptr = card;
devres_add(dev, ptr);
} else {
devres_free(ptr);
}
-
--[[linux-4.4.1/snd_soc_register_card()]]
--[[linux-4.4.1/devres_add()]]
--[[linux-4.4.1/devres_free()]]
return ret;
}
EXPORT_SYMBOL_GPL(devm_snd_soc_register_card);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#pbf28f64]
ページ名: