Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
d99a910a
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d99a910a
编写于
9月 19, 2012
作者:
R
Russell King
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'clkdev' into fixes
上级
2b25d9f6
20332ff3
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
56 addition
and
51 deletion
+56
-51
arch/m68k/platform/coldfire/clk.c
arch/m68k/platform/coldfire/clk.c
+0
-6
drivers/clk/Makefile
drivers/clk/Makefile
+1
-0
drivers/clk/clk-devres.c
drivers/clk/clk-devres.c
+55
-0
drivers/clk/clkdev.c
drivers/clk/clkdev.c
+0
-45
未找到文件。
arch/m68k/platform/coldfire/clk.c
浏览文件 @
d99a910a
...
...
@@ -146,9 +146,3 @@ struct clk_ops clk_ops1 = {
};
#endif
/* MCFPM_PPMCR1 */
#endif
/* MCFPM_PPMCR0 */
struct
clk
*
devm_clk_get
(
struct
device
*
dev
,
const
char
*
id
)
{
return
NULL
;
}
EXPORT_SYMBOL
(
devm_clk_get
);
drivers/clk/Makefile
浏览文件 @
d99a910a
# common clock types
obj-$(CONFIG_HAVE_CLK)
+=
clk-devres.o
obj-$(CONFIG_CLKDEV_LOOKUP)
+=
clkdev.o
obj-$(CONFIG_COMMON_CLK)
+=
clk.o clk-fixed-rate.o clk-gate.o
\
clk-mux.o clk-divider.o clk-fixed-factor.o
...
...
drivers/clk/clk-devres.c
0 → 100644
浏览文件 @
d99a910a
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/export.h>
#include <linux/gfp.h>
static
void
devm_clk_release
(
struct
device
*
dev
,
void
*
res
)
{
clk_put
(
*
(
struct
clk
**
)
res
);
}
struct
clk
*
devm_clk_get
(
struct
device
*
dev
,
const
char
*
id
)
{
struct
clk
**
ptr
,
*
clk
;
ptr
=
devres_alloc
(
devm_clk_release
,
sizeof
(
*
ptr
),
GFP_KERNEL
);
if
(
!
ptr
)
return
ERR_PTR
(
-
ENOMEM
);
clk
=
clk_get
(
dev
,
id
);
if
(
!
IS_ERR
(
clk
))
{
*
ptr
=
clk
;
devres_add
(
dev
,
ptr
);
}
else
{
devres_free
(
ptr
);
}
return
clk
;
}
EXPORT_SYMBOL
(
devm_clk_get
);
static
int
devm_clk_match
(
struct
device
*
dev
,
void
*
res
,
void
*
data
)
{
struct
clk
**
c
=
res
;
if
(
!
c
||
!*
c
)
{
WARN_ON
(
!
c
||
!*
c
);
return
0
;
}
return
*
c
==
data
;
}
void
devm_clk_put
(
struct
device
*
dev
,
struct
clk
*
clk
)
{
int
ret
;
ret
=
devres_release
(
dev
,
devm_clk_release
,
devm_clk_match
,
clk
);
WARN_ON
(
ret
);
}
EXPORT_SYMBOL
(
devm_clk_put
);
drivers/clk/clkdev.c
浏览文件 @
d99a910a
...
...
@@ -171,51 +171,6 @@ void clk_put(struct clk *clk)
}
EXPORT_SYMBOL
(
clk_put
);
static
void
devm_clk_release
(
struct
device
*
dev
,
void
*
res
)
{
clk_put
(
*
(
struct
clk
**
)
res
);
}
struct
clk
*
devm_clk_get
(
struct
device
*
dev
,
const
char
*
id
)
{
struct
clk
**
ptr
,
*
clk
;
ptr
=
devres_alloc
(
devm_clk_release
,
sizeof
(
*
ptr
),
GFP_KERNEL
);
if
(
!
ptr
)
return
ERR_PTR
(
-
ENOMEM
);
clk
=
clk_get
(
dev
,
id
);
if
(
!
IS_ERR
(
clk
))
{
*
ptr
=
clk
;
devres_add
(
dev
,
ptr
);
}
else
{
devres_free
(
ptr
);
}
return
clk
;
}
EXPORT_SYMBOL
(
devm_clk_get
);
static
int
devm_clk_match
(
struct
device
*
dev
,
void
*
res
,
void
*
data
)
{
struct
clk
**
c
=
res
;
if
(
!
c
||
!*
c
)
{
WARN_ON
(
!
c
||
!*
c
);
return
0
;
}
return
*
c
==
data
;
}
void
devm_clk_put
(
struct
device
*
dev
,
struct
clk
*
clk
)
{
int
ret
;
ret
=
devres_destroy
(
dev
,
devm_clk_release
,
devm_clk_match
,
clk
);
WARN_ON
(
ret
);
}
EXPORT_SYMBOL
(
devm_clk_put
);
void
clkdev_add
(
struct
clk_lookup
*
cl
)
{
mutex_lock
(
&
clocks_mutex
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录