diff options
Diffstat (limited to 'meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch')
-rw-r--r-- | meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch new file mode 100644 index 000000000..b2771c0c9 --- /dev/null +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From e0b2be7a1fce0fed63bac8c350b711b69edfe30e Mon Sep 17 00:00:00 2001 | ||
2 | From: "yanjun.zhu" <yanjun.zhu@windriver.com> | ||
3 | Date: Tue, 30 Apr 2019 10:04:58 +0800 | ||
4 | Subject: [PATCH] openhpid/safhpi.c: fix function saHpiSensorThresholdsSet | ||
5 | |||
6 | In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if | ||
7 | TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not | ||
8 | SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will | ||
9 | be set even if TH.IsSupported == SAHPI_FALSE. | ||
10 | |||
11 | Upstream-Status: Submitted | ||
12 | [https://github.com/open-hpi/openhpi/pull/2744/commits/77a78bb1ada56e55c5ba6d7a5987c214705bf035] | ||
13 | |||
14 | Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> | ||
15 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
16 | --- | ||
17 | openhpid/safhpi.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/openhpid/safhpi.c b/openhpid/safhpi.c | ||
21 | index 28a2632..61b7f03 100644 | ||
22 | --- a/openhpid/safhpi.c | ||
23 | +++ b/openhpid/safhpi.c | ||
24 | @@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholdsSet ( | ||
25 | oh_release_domain(d); /* Unlock domain */ | ||
26 | |||
27 | OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv, | ||
28 | - ResourceId, SensorNum, SensorThresholds); | ||
29 | + ResourceId, SensorNum, &tmp); | ||
30 | oh_release_handler(h); | ||
31 | |||
32 | return rv; | ||
33 | -- | ||
34 | 2.7.4 | ||
35 | |||