Skip to content

Commit

Permalink
greybus: svc: clean up link configuration hack at hello
Browse files Browse the repository at this point in the history
Commit ee2f207 ("greybus: svc: reconfig APBridgeA-Switch link to
handle required load") added a temporary hack which reconfigures the
link at HELLO by abusing the deferred request processing mechanism.

Restructure the HELLO request processing so that the link-configuration
work is queued before creating the debugfs files and add a comment
explaining why it's there.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20220202113347.1288-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jhovold authored and gregkh committed Feb 4, 2022
1 parent 5f648e0 commit a74e726
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/greybus/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,16 +864,19 @@ static int gb_svc_hello(struct gb_operation *op)
goto err_deregister_svc;
}

gb_svc_debugfs_init(svc);

/*
* FIXME: This is a temporary hack to reconfigure the link at HELLO
* (which abuses the deferred request processing mechanism).
*/
ret = gb_svc_queue_deferred_request(op);
if (ret)
goto err_remove_debugfs;
goto err_destroy_watchdog;

gb_svc_debugfs_init(svc);

return 0;

err_remove_debugfs:
gb_svc_debugfs_exit(svc);
err_destroy_watchdog:
gb_svc_watchdog_destroy(svc);
err_deregister_svc:
device_del(&svc->dev);
Expand Down

0 comments on commit a74e726

Please sign in to comment.