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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:45:19 +0000 (18:45 +0100)
commitaf448bb2eaba0d069f66b069a15440fcd36a21ca
tree6c20a618e8e2cb962eb4ec55f457f7fcf4fca3fb
parent2d16a9f778f7af55d8c488c7ad8e58c2577016fd
scripts/gdb: fix lx-device-list-bus and lx-device-list-class

[ Upstream commit 801a2b1b49f4dcf06703130922806e9c639c2ca8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/gdb/linux/device.py