scripts/gdb: fix lx-device-list-bus and lx-device-list-class
authorFlorian Fainelli <florian.fainelli@broadcom.com>
Thu, 30 Nov 2023 04:33:16 +0000 (20:33 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 7 Dec 2023 00:12:49 +0000 (16:12 -0800)
commit801a2b1b49f4dcf06703130922806e9c639c2ca8
treeca0371acfa00b7151ea6ad767b2960e4540b2c5a
parentbc220fe70919d6500811e5e1e07aff43e137065a
scripts/gdb: fix lx-device-list-bus and lx-device-list-class

After the conversion to bus_to_subsys() and class_to_subsys(), the gdb
scripts listing the system buses and classes respectively was broken, fix
those by returning the subsys_priv pointer and have the various caller
de-reference either the 'bus' or 'class' structure members accordingly.

Link: https://lkml.kernel.org/r/20231130043317.174188-1-florian.fainelli@broadcom.com
Fixes: 7b884b7f24b4 ("driver core: class.c: convert to only use class_to_subsys")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/gdb/linux/device.py