mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
bus: mhi: ep: Add checks for read/write callbacks while registering controllers
The MHI EP controller drivers has to support both sync and async read/write callbacks. Hence, add a check for it. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
This commit is contained in:
parent
2547beb00d
commit
309ab14f70
1 changed files with 4 additions and 0 deletions
|
|
@ -1464,6 +1464,10 @@ int mhi_ep_register_controller(struct mhi_ep_cntrl *mhi_cntrl,
|
|||
if (!mhi_cntrl || !mhi_cntrl->cntrl_dev || !mhi_cntrl->mmio || !mhi_cntrl->irq)
|
||||
return -EINVAL;
|
||||
|
||||
if (!mhi_cntrl->read_sync || !mhi_cntrl->write_sync ||
|
||||
!mhi_cntrl->read_async || !mhi_cntrl->write_async)
|
||||
return -EINVAL;
|
||||
|
||||
ret = mhi_ep_chan_init(mhi_cntrl, config);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue