diff options
Diffstat (limited to 'meta-python')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-gpiod/0001-bindings-python-tests-disable-device-before-releasin.patch | 49 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-gpiod_2.2.4.bb (renamed from meta-python/recipes-devtools/python/python3-gpiod_2.2.3.bb) | 7 |
2 files changed, 2 insertions, 54 deletions
diff --git a/meta-python/recipes-devtools/python/python3-gpiod/0001-bindings-python-tests-disable-device-before-releasin.patch b/meta-python/recipes-devtools/python/python3-gpiod/0001-bindings-python-tests-disable-device-before-releasin.patch deleted file mode 100644 index 9025e0d72d..0000000000 --- a/meta-python/recipes-devtools/python/python3-gpiod/0001-bindings-python-tests-disable-device-before-releasin.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From ad91b034e7575074998b3e480b592e3ae6d00def Mon Sep 17 00:00:00 2001 | ||
2 | From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | ||
3 | Date: Tue, 4 Feb 2025 09:36:13 +0100 | ||
4 | Subject: [PATCH] bindings: python: tests: disable device before releasing the | ||
5 | bank | ||
6 | |||
7 | Linux kernel commit 8bd76b3d3f3a ("gpio: sim: lock up configfs that an | ||
8 | instantiated device depends on") uncovered an issue in Python bindings | ||
9 | tests where the GPIO simulator device is not disabled before removing its | ||
10 | configfs entries. Reorder the operations in chip_finalize() in order to | ||
11 | disable the device first (if needed) before releasing any other | ||
12 | resources. | ||
13 | |||
14 | Upstream-Status: Submitted [https://lore.kernel.org/all/20250203-fix-gpiosim-in-bindings-v1-2-d2c9e0f3a29d@linaro.org/] | ||
15 | |||
16 | Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | ||
17 | --- | ||
18 | tests/gpiosim/ext.c | 11 ++++++----- | ||
19 | 1 file changed, 6 insertions(+), 5 deletions(-) | ||
20 | |||
21 | diff --git a/tests/gpiosim/ext.c b/tests/gpiosim/ext.c | ||
22 | index 272e6f7..cb5611a 100644 | ||
23 | --- a/tests/gpiosim/ext.c | ||
24 | +++ b/tests/gpiosim/ext.c | ||
25 | @@ -96,15 +96,16 @@ static int chip_init(chip_object *self, | ||
26 | |||
27 | static void chip_finalize(chip_object *self) | ||
28 | { | ||
29 | - if (self->bank) | ||
30 | - gpiosim_bank_unref(self->bank); | ||
31 | - | ||
32 | if (self->dev) { | ||
33 | if (gpiosim_dev_is_live(self->dev)) | ||
34 | gpiosim_dev_disable(self->dev); | ||
35 | - | ||
36 | - gpiosim_dev_unref(self->dev); | ||
37 | } | ||
38 | + | ||
39 | + if (self->bank) | ||
40 | + gpiosim_bank_unref(self->bank); | ||
41 | + | ||
42 | + if (self->dev) | ||
43 | + gpiosim_dev_unref(self->dev); | ||
44 | } | ||
45 | |||
46 | static void chip_dealloc(PyObject *self) | ||
47 | -- | ||
48 | 2.45.2 | ||
49 | |||
diff --git a/meta-python/recipes-devtools/python/python3-gpiod_2.2.3.bb b/meta-python/recipes-devtools/python/python3-gpiod_2.2.4.bb index bdc7e52ca5..7efbc5b80a 100644 --- a/meta-python/recipes-devtools/python/python3-gpiod_2.2.3.bb +++ b/meta-python/recipes-devtools/python/python3-gpiod_2.2.4.bb | |||
@@ -5,12 +5,9 @@ LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" | |||
5 | # package is spun out. | 5 | # package is spun out. |
6 | LIC_FILES_CHKSUM = "file://setup.py;beginline=241;endline=241;md5=f5ddb56912b7f20bf94aa4d1bdcd3533" | 6 | LIC_FILES_CHKSUM = "file://setup.py;beginline=241;endline=241;md5=f5ddb56912b7f20bf94aa4d1bdcd3533" |
7 | 7 | ||
8 | SRC_URI += " \ | 8 | SRC_URI += "file://run-ptest" |
9 | file://run-ptest \ | ||
10 | file://0001-bindings-python-tests-disable-device-before-releasin.patch \ | ||
11 | " | ||
12 | 9 | ||
13 | SRC_URI[sha256sum] = "b916c3741dfc4dbcf6224b39e50765f672b137896287715709d49e9f063304c5" | 10 | SRC_URI[sha256sum] = "4923c27262c70815054fe7a1962b98dd1d6822a541c103d0acd7f42fc9aabae9" |
14 | 11 | ||
15 | inherit python_setuptools_build_meta python_pep517 ptest pypi | 12 | inherit python_setuptools_build_meta python_pep517 ptest pypi |
16 | 13 | ||