diff options
author | Ivan Hu <ivan.hu@canonical.com> | 2025-06-16 15:48:19 +0800 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-06-17 15:31:40 +0300 |
commit | c8892c2a5b27d4026cda60409c393ba0d6c88df9 (patch) | |
tree | bea174c1a1728607c6aae53e58fbfe0fb5b1b4ea /scripts/lib/kdoc/kdoc_files.py | |
parent | e2468dc700743683e1d1793bbd855e2536fd3de2 (diff) |
platform/x86: portwell-ec: Move watchdog device under correct platform hierarchy
Without explicitly setting a parent for the watchdog device, the device is
registered with a NULL parent. This causes device_add() (called internally
by devm_watchdog_register_device()) to register the device under
/sys/devices/virtual, since no parent is provided. The result is:
DEVPATH=/devices/virtual/watchdog/watchdog0
To fix this, assign &pdev->dev as the parent of the watchdog device before
calling devm_watchdog_register_device(). This ensures the device is
associated with the Portwell EC platform device and placed correctly in
sysfs as:
DEVPATH=/devices/platform/portwell-ec/watchdog/watchdog0
This aligns the device hierarchy with expectations and avoids misplacement
under the virtual class.
Fixes: 835796753310 ("platform/x86: portwell-ec: Add GPIO and WDT driver for Portwell EC")
Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
Link: https://lore.kernel.org/r/20250616074819.63547-1-ivan.hu@canonical.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions