diff options
| author | Sanjay Chitroda <sanjayembeddedse@gmail.com> | 2026-07-02 21:48:03 +0530 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-07-02 18:27:29 +0100 |
| commit | 0c50c9e3b2a4acb2b5b238ba58537f5525532527 (patch) | |
| tree | b86901edc703bdafb3fadee544e47926f4d73954 /tools/perf/scripts/python/stackcollapse.py | |
| parent | d9290c908d6f31bcdf79c1fec9b7287cf65df19b (diff) | |
iio: temperature: hid-sensor-temperature: use common device for devres
kmemdup() is used for memory that is logically tied to the HID
platform device, even though the driver binds into the IIO framework.
Using &indio_dev->dev for devres allocations works functionally, but it
results in two separate devres ownership trees—one for the HID
platform device (pdev) and another for the IIO device (indio_dev).
The devres framework is intended to have a single, well-defined parent
device. Since the memory originates from HID sensor probing and is not
IIO-specific, &pdev->dev is the correct and logical owner.
Switch to using the platform device for devm_kmemdup() so that all
resources are released deterministically and consistently.
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
