Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
e3c51ca8
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
163
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e3c51ca8
编写于
9月 17, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/devm' into asoc-samsung
上级
b3a6006e
0e4ff5c8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
91 addition
and
1 deletion
+91
-1
include/sound/soc.h
include/sound/soc.h
+4
-0
sound/soc/Makefile
sound/soc/Makefile
+1
-1
sound/soc/soc-devres.c
sound/soc/soc-devres.c
+86
-0
未找到文件。
include/sound/soc.h
浏览文件 @
e3c51ca8
...
...
@@ -369,6 +369,7 @@ int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
int
snd_soc_register_card
(
struct
snd_soc_card
*
card
);
int
snd_soc_unregister_card
(
struct
snd_soc_card
*
card
);
int
devm_snd_soc_register_card
(
struct
device
*
dev
,
struct
snd_soc_card
*
card
);
int
snd_soc_suspend
(
struct
device
*
dev
);
int
snd_soc_resume
(
struct
device
*
dev
);
int
snd_soc_poweroff
(
struct
device
*
dev
);
...
...
@@ -386,6 +387,9 @@ void snd_soc_unregister_codec(struct device *dev);
int
snd_soc_register_component
(
struct
device
*
dev
,
const
struct
snd_soc_component_driver
*
cmpnt_drv
,
struct
snd_soc_dai_driver
*
dai_drv
,
int
num_dai
);
int
devm_snd_soc_register_component
(
struct
device
*
dev
,
const
struct
snd_soc_component_driver
*
cmpnt_drv
,
struct
snd_soc_dai_driver
*
dai_drv
,
int
num_dai
);
void
snd_soc_unregister_component
(
struct
device
*
dev
);
int
snd_soc_codec_volatile_register
(
struct
snd_soc_codec
*
codec
,
unsigned
int
reg
);
...
...
sound/soc/Makefile
浏览文件 @
e3c51ca8
snd-soc-core-objs
:=
soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o
snd-soc-core-objs
+=
soc-pcm.o soc-compress.o soc-io.o
snd-soc-core-objs
+=
soc-pcm.o soc-compress.o soc-io.o
soc-devres.o
ifneq
($(CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM),)
snd-soc-core-objs
+=
soc-generic-dmaengine-pcm.o
...
...
sound/soc/soc-devres.c
0 → 100644
浏览文件 @
e3c51ca8
/*
* soc-devres.c -- ALSA SoC Audio Layer devres functions
*
* Copyright (C) 2013 Linaro Ltd
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <sound/soc.h>
static
void
devm_component_release
(
struct
device
*
dev
,
void
*
res
)
{
snd_soc_unregister_component
(
*
(
struct
device
**
)
res
);
}
/**
* devm_snd_soc_register_component - resource managed component registration
* @dev: Device used to manage component
* @cmpnt_drv: Component driver
* @dai_drv: DAI driver
* @num_dai: Number of DAIs to register
*
* Register a component with automatic unregistration when the device is
* unregistered.
*/
int
devm_snd_soc_register_component
(
struct
device
*
dev
,
const
struct
snd_soc_component_driver
*
cmpnt_drv
,
struct
snd_soc_dai_driver
*
dai_drv
,
int
num_dai
)
{
struct
device
**
ptr
;
int
ret
;
ptr
=
devres_alloc
(
devm_component_release
,
sizeof
(
*
ptr
),
GFP_KERNEL
);
if
(
!
ptr
)
return
-
ENOMEM
;
ret
=
snd_soc_register_component
(
dev
,
cmpnt_drv
,
dai_drv
,
num_dai
);
if
(
ret
==
0
)
{
*
ptr
=
dev
;
devres_add
(
dev
,
ptr
);
}
else
{
devres_free
(
ptr
);
}
return
ret
;
}
EXPORT_SYMBOL_GPL
(
devm_snd_soc_register_component
);
static
void
devm_card_release
(
struct
device
*
dev
,
void
*
res
)
{
snd_soc_unregister_card
(
*
(
struct
snd_soc_card
**
)
res
);
}
/**
* devm_snd_soc_register_card - resource managed card registration
* @dev: Device used to manage card
* @card: Card to register
*
* Register a card with automatic unregistration when the device is
* unregistered.
*/
int
devm_snd_soc_register_card
(
struct
device
*
dev
,
struct
snd_soc_card
*
card
)
{
struct
device
**
ptr
;
int
ret
;
ptr
=
devres_alloc
(
devm_card_release
,
sizeof
(
*
ptr
),
GFP_KERNEL
);
if
(
!
ptr
)
return
-
ENOMEM
;
ret
=
snd_soc_register_card
(
card
);
if
(
ret
==
0
)
{
*
ptr
=
dev
;
devres_add
(
dev
,
ptr
);
}
else
{
devres_free
(
ptr
);
}
return
ret
;
}
EXPORT_SYMBOL_GPL
(
devm_snd_soc_register_card
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录