net: qrtr: mhi: Set mhi driver data before registering with qrtr
The original design was to not send anything from qrtr-mhi until
a packet was received from the remote side. This would leave
enough time for the probe function to set up the driver_date.
With the new requirement to queue a hello packet (for Linux to
Linux communication), we may see the hello packet being scheduled
and sent before we can return and set the drvdata.
The changes to address the above requirement brings in a
possibility that driver_data in mhi layer is NULL sometimes.
Check device pointer for NULL in ul callback and return if
it is NULL.
Move the setting of driver data before registering it as an
endpoint with the qrtr framework.
Change-Id: Ida94d95485d2432f38e6cb0c82fa21af7bc73af3
Signed-off-by:
Jay Jayanna <jayanna@codeaurora.org>
Loading
Please register or sign in to comment