Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
58658659
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
58658659
编写于
3月 13, 2016
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'regulator/fix/core' into regulator-linus
上级
f6cede5b
6333ef46
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
17 deletion
+12
-17
drivers/regulator/core.c
drivers/regulator/core.c
+12
-17
未找到文件。
drivers/regulator/core.c
浏览文件 @
58658659
...
...
@@ -1057,18 +1057,18 @@ static int set_machine_constraints(struct regulator_dev *rdev,
ret
=
machine_constraints_voltage
(
rdev
,
rdev
->
constraints
);
if
(
ret
!=
0
)
goto
ou
t
;
return
re
t
;
ret
=
machine_constraints_current
(
rdev
,
rdev
->
constraints
);
if
(
ret
!=
0
)
goto
ou
t
;
return
re
t
;
if
(
rdev
->
constraints
->
ilim_uA
&&
ops
->
set_input_current_limit
)
{
ret
=
ops
->
set_input_current_limit
(
rdev
,
rdev
->
constraints
->
ilim_uA
);
if
(
ret
<
0
)
{
rdev_err
(
rdev
,
"failed to set input limit
\n
"
);
goto
ou
t
;
return
re
t
;
}
}
...
...
@@ -1077,21 +1077,20 @@ static int set_machine_constraints(struct regulator_dev *rdev,
ret
=
suspend_prepare
(
rdev
,
rdev
->
constraints
->
initial_state
);
if
(
ret
<
0
)
{
rdev_err
(
rdev
,
"failed to set suspend state
\n
"
);
goto
ou
t
;
return
re
t
;
}
}
if
(
rdev
->
constraints
->
initial_mode
)
{
if
(
!
ops
->
set_mode
)
{
rdev_err
(
rdev
,
"no set_mode operation
\n
"
);
ret
=
-
EINVAL
;
goto
out
;
return
-
EINVAL
;
}
ret
=
ops
->
set_mode
(
rdev
,
rdev
->
constraints
->
initial_mode
);
if
(
ret
<
0
)
{
rdev_err
(
rdev
,
"failed to set initial mode: %d
\n
"
,
ret
);
goto
ou
t
;
return
re
t
;
}
}
...
...
@@ -1102,7 +1101,7 @@ static int set_machine_constraints(struct regulator_dev *rdev,
ret
=
_regulator_do_enable
(
rdev
);
if
(
ret
<
0
&&
ret
!=
-
EINVAL
)
{
rdev_err
(
rdev
,
"failed to enable
\n
"
);
goto
ou
t
;
return
re
t
;
}
}
...
...
@@ -1111,7 +1110,7 @@ static int set_machine_constraints(struct regulator_dev *rdev,
ret
=
ops
->
set_ramp_delay
(
rdev
,
rdev
->
constraints
->
ramp_delay
);
if
(
ret
<
0
)
{
rdev_err
(
rdev
,
"failed to set ramp_delay
\n
"
);
goto
ou
t
;
return
re
t
;
}
}
...
...
@@ -1119,7 +1118,7 @@ static int set_machine_constraints(struct regulator_dev *rdev,
ret
=
ops
->
set_pull_down
(
rdev
);
if
(
ret
<
0
)
{
rdev_err
(
rdev
,
"failed to set pull down
\n
"
);
goto
ou
t
;
return
re
t
;
}
}
...
...
@@ -1127,7 +1126,7 @@ static int set_machine_constraints(struct regulator_dev *rdev,
ret
=
ops
->
set_soft_start
(
rdev
);
if
(
ret
<
0
)
{
rdev_err
(
rdev
,
"failed to set soft start
\n
"
);
goto
ou
t
;
return
re
t
;
}
}
...
...
@@ -1136,16 +1135,12 @@ static int set_machine_constraints(struct regulator_dev *rdev,
ret
=
ops
->
set_over_current_protection
(
rdev
);
if
(
ret
<
0
)
{
rdev_err
(
rdev
,
"failed to set over current protection
\n
"
);
goto
ou
t
;
return
re
t
;
}
}
print_constraints
(
rdev
);
return
0
;
out:
kfree
(
rdev
->
constraints
);
rdev
->
constraints
=
NULL
;
return
ret
;
}
/**
...
...
@@ -3979,7 +3974,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
scrub:
regulator_ena_gpio_free
(
rdev
);
kfree
(
rdev
->
constraints
);
wash:
device_unregister
(
&
rdev
->
dev
);
/* device core frees rdev */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录