提交 ebd6823a 编写于 作者: S Saravana Kannan 提交者: Greg Kroah-Hartman

driver core: Add debug logs when fwnode links are added/deleted

This will help with debugging fw_devlink issues.
Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: NSaravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20210915172808.620546-4-saravanak@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 76f13081
...@@ -95,6 +95,8 @@ int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup) ...@@ -95,6 +95,8 @@ int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup)
list_add(&link->s_hook, &sup->consumers); list_add(&link->s_hook, &sup->consumers);
list_add(&link->c_hook, &con->suppliers); list_add(&link->c_hook, &con->suppliers);
pr_debug("%pfwP Linked as a fwnode consumer to %pfwP\n",
con, sup);
out: out:
mutex_unlock(&fwnode_link_lock); mutex_unlock(&fwnode_link_lock);
...@@ -109,6 +111,8 @@ int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup) ...@@ -109,6 +111,8 @@ int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup)
*/ */
static void __fwnode_link_del(struct fwnode_link *link) static void __fwnode_link_del(struct fwnode_link *link)
{ {
pr_debug("%pfwP Dropping the fwnode link to %pfwP\n",
link->consumer, link->supplier);
list_del(&link->s_hook); list_del(&link->s_hook);
list_del(&link->c_hook); list_del(&link->c_hook);
kfree(link); kfree(link);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册