Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
0b8a53a8
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看板
提交
0b8a53a8
编写于
7月 23, 2021
作者:
R
Rafael J. Wysocki
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'acpi-utils'
* acpi-utils: ACPI: utils: Fix reference counting in for_each_acpi_dev_match()
上级
d2cbbf1f
71f64283
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
14 deletion
+5
-14
drivers/acpi/utils.c
drivers/acpi/utils.c
+3
-4
drivers/firmware/efi/dev-path-parser.c
drivers/firmware/efi/dev-path-parser.c
+0
-1
drivers/media/pci/intel/ipu3/cio2-bridge.c
drivers/media/pci/intel/ipu3/cio2-bridge.c
+2
-4
include/acpi/acpi_bus.h
include/acpi/acpi_bus.h
+0
-5
未找到文件。
drivers/acpi/utils.c
浏览文件 @
0b8a53a8
...
...
@@ -860,11 +860,9 @@ EXPORT_SYMBOL(acpi_dev_present);
* Return the next match of ACPI device if another matching device was present
* at the moment of invocation, or NULL otherwise.
*
* FIXME: The function does not tolerate the sudden disappearance of @adev, e.g.
* in the case of a hotplug event. That said, the caller should ensure that
* this will never happen.
*
* The caller is responsible for invoking acpi_dev_put() on the returned device.
* On the other hand the function invokes acpi_dev_put() on the given @adev
* assuming that its reference counter had been increased beforehand.
*
* See additional information in acpi_dev_present() as well.
*/
...
...
@@ -880,6 +878,7 @@ acpi_dev_get_next_match_dev(struct acpi_device *adev, const char *hid, const cha
match
.
hrv
=
hrv
;
dev
=
bus_find_device
(
&
acpi_bus_type
,
start
,
&
match
,
acpi_dev_match_cb
);
acpi_dev_put
(
adev
);
return
dev
?
to_acpi_device
(
dev
)
:
NULL
;
}
EXPORT_SYMBOL
(
acpi_dev_get_next_match_dev
);
...
...
drivers/firmware/efi/dev-path-parser.c
浏览文件 @
0b8a53a8
...
...
@@ -34,7 +34,6 @@ static long __init parse_acpi_path(const struct efi_dev_path *node,
break
;
if
(
!
adev
->
pnp
.
unique_id
&&
node
->
acpi
.
uid
==
0
)
break
;
acpi_dev_put
(
adev
);
}
if
(
!
adev
)
return
-
ENODEV
;
...
...
drivers/media/pci/intel/ipu3/cio2-bridge.c
浏览文件 @
0b8a53a8
...
...
@@ -173,10 +173,8 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg,
int
ret
;
for_each_acpi_dev_match
(
adev
,
cfg
->
hid
,
NULL
,
-
1
)
{
if
(
!
adev
->
status
.
enabled
)
{
acpi_dev_put
(
adev
);
if
(
!
adev
->
status
.
enabled
)
continue
;
}
if
(
bridge
->
n_sensors
>=
CIO2_NUM_PORTS
)
{
acpi_dev_put
(
adev
);
...
...
@@ -185,7 +183,6 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg,
}
sensor
=
&
bridge
->
sensors
[
bridge
->
n_sensors
];
sensor
->
adev
=
adev
;
strscpy
(
sensor
->
name
,
cfg
->
hid
,
sizeof
(
sensor
->
name
));
ret
=
cio2_bridge_read_acpi_buffer
(
adev
,
"SSDB"
,
...
...
@@ -215,6 +212,7 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg,
goto
err_free_swnodes
;
}
sensor
->
adev
=
acpi_dev_get
(
adev
);
adev
->
fwnode
.
secondary
=
fwnode
;
dev_info
(
&
cio2
->
dev
,
"Found supported sensor %s
\n
"
,
...
...
include/acpi/acpi_bus.h
浏览文件 @
0b8a53a8
...
...
@@ -707,11 +707,6 @@ acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv);
* @hrv: Hardware Revision of the device, pass -1 to not check _HRV
*
* The caller is responsible for invoking acpi_dev_put() on the returned device.
*
* FIXME: Due to above requirement there is a window that may invalidate @adev
* and next iteration will use a dangling pointer, e.g. in the case of a
* hotplug event. That said, the caller should ensure that this will never
* happen.
*/
#define for_each_acpi_dev_match(adev, hid, uid, hrv) \
for (adev = acpi_dev_get_first_match_dev(hid, uid, hrv); \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录