From: Lucas De Marchi Date: Sat, 22 Feb 2025 00:10:43 +0000 (-0800) Subject: drivers: base: component: Add debug message for unbind X-Git-Tag: v6.15-rc1~120^2~10^2~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2babfdfe2e9bd0b6aad30684c92b08c57d476d88;p=thirdparty%2Fkernel%2Flinux.git drivers: base: component: Add debug message for unbind Like when binding component, add a debug message to the unbinding case to make it easy to track the lifecycle. This also includes the component pointer since that is used to open a group in devres, making it easier to track the resources. Acked-by: Greg Kroah-Hartman Reviewed-by: Rodrigo Vivi Reviewed-by: Tejas Upadhyay Link: https://patchwork.freedesktop.org/patch/msgid/20250222001051.3012936-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi --- diff --git a/drivers/base/component.c b/drivers/base/component.c index 741497324d78a..5d10600bbc25e 100644 --- a/drivers/base/component.c +++ b/drivers/base/component.c @@ -574,6 +574,9 @@ static void component_unbind(struct component *component, { WARN_ON(!component->bound); + dev_dbg(adev->parent, "unbinding %s component %p (ops %ps)\n", + dev_name(component->dev), component, component->ops); + if (component->ops && component->ops->unbind) component->ops->unbind(component->dev, adev->parent, data); component->bound = false;