Loading drivers/bus/mhi/core/mhi_dtr.c +9 −4 Original line number Diff line number Diff line Loading @@ -119,7 +119,12 @@ long mhi_ioctl(struct mhi_device *mhi_dev, unsigned int cmd, unsigned long arg) } EXPORT_SYMBOL(mhi_ioctl); static void mhi_dtr_xfer_cb(struct mhi_device *mhi_dev, static void mhi_dtr_dl_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result *mhi_result) { } static void mhi_dtr_ul_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result *mhi_result) { struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl; Loading Loading @@ -163,8 +168,8 @@ static struct mhi_driver mhi_dtr_driver = { .id_table = mhi_dtr_table, .remove = mhi_dtr_remove, .probe = mhi_dtr_probe, .ul_xfer_cb = mhi_dtr_xfer_cb, .dl_xfer_cb = mhi_dtr_xfer_cb, .ul_xfer_cb = mhi_dtr_ul_xfer_cb, .dl_xfer_cb = mhi_dtr_dl_xfer_cb, .driver = { .name = "MHI_DTR", .owner = THIS_MODULE, Loading drivers/bus/mhi/core/mhi_init.c +3 −0 Original line number Diff line number Diff line Loading @@ -1242,6 +1242,9 @@ static int mhi_driver_remove(struct device *dev) !mhi_chan->offload_ch) mhi_deinit_chan_ctxt(mhi_cntrl, mhi_chan); /* remove associated device */ mhi_chan->mhi_dev = NULL; mutex_unlock(&mhi_chan->mutex); } Loading drivers/bus/mhi/core/mhi_main.c +0 −16 Original line number Diff line number Diff line Loading @@ -461,32 +461,16 @@ int mhi_queue_buf(struct mhi_device *mhi_dev, int mhi_destroy_device(struct device *dev, void *data) { struct mhi_device *mhi_dev; struct mhi_driver *mhi_drv; struct mhi_controller *mhi_cntrl; struct mhi_chan *mhi_chan; int dir; if (dev->bus != &mhi_bus_type) return 0; mhi_dev = to_mhi_device(dev); mhi_drv = to_mhi_driver(dev->driver); mhi_cntrl = mhi_dev->mhi_cntrl; MHI_LOG("destroy device for chan:%s\n", mhi_dev->chan_name); for (dir = 0; dir < 2; dir++) { mhi_chan = dir ? mhi_dev->ul_chan : mhi_dev->dl_chan; if (!mhi_chan) continue; /* remove device associated with the channel */ mutex_lock(&mhi_chan->mutex); mhi_chan->mhi_dev = NULL; mutex_unlock(&mhi_chan->mutex); } /* notify the client and remove the device from mhi bus */ device_del(dev); put_device(dev); Loading Loading
drivers/bus/mhi/core/mhi_dtr.c +9 −4 Original line number Diff line number Diff line Loading @@ -119,7 +119,12 @@ long mhi_ioctl(struct mhi_device *mhi_dev, unsigned int cmd, unsigned long arg) } EXPORT_SYMBOL(mhi_ioctl); static void mhi_dtr_xfer_cb(struct mhi_device *mhi_dev, static void mhi_dtr_dl_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result *mhi_result) { } static void mhi_dtr_ul_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result *mhi_result) { struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl; Loading Loading @@ -163,8 +168,8 @@ static struct mhi_driver mhi_dtr_driver = { .id_table = mhi_dtr_table, .remove = mhi_dtr_remove, .probe = mhi_dtr_probe, .ul_xfer_cb = mhi_dtr_xfer_cb, .dl_xfer_cb = mhi_dtr_xfer_cb, .ul_xfer_cb = mhi_dtr_ul_xfer_cb, .dl_xfer_cb = mhi_dtr_dl_xfer_cb, .driver = { .name = "MHI_DTR", .owner = THIS_MODULE, Loading
drivers/bus/mhi/core/mhi_init.c +3 −0 Original line number Diff line number Diff line Loading @@ -1242,6 +1242,9 @@ static int mhi_driver_remove(struct device *dev) !mhi_chan->offload_ch) mhi_deinit_chan_ctxt(mhi_cntrl, mhi_chan); /* remove associated device */ mhi_chan->mhi_dev = NULL; mutex_unlock(&mhi_chan->mutex); } Loading
drivers/bus/mhi/core/mhi_main.c +0 −16 Original line number Diff line number Diff line Loading @@ -461,32 +461,16 @@ int mhi_queue_buf(struct mhi_device *mhi_dev, int mhi_destroy_device(struct device *dev, void *data) { struct mhi_device *mhi_dev; struct mhi_driver *mhi_drv; struct mhi_controller *mhi_cntrl; struct mhi_chan *mhi_chan; int dir; if (dev->bus != &mhi_bus_type) return 0; mhi_dev = to_mhi_device(dev); mhi_drv = to_mhi_driver(dev->driver); mhi_cntrl = mhi_dev->mhi_cntrl; MHI_LOG("destroy device for chan:%s\n", mhi_dev->chan_name); for (dir = 0; dir < 2; dir++) { mhi_chan = dir ? mhi_dev->ul_chan : mhi_dev->dl_chan; if (!mhi_chan) continue; /* remove device associated with the channel */ mutex_lock(&mhi_chan->mutex); mhi_chan->mhi_dev = NULL; mutex_unlock(&mhi_chan->mutex); } /* notify the client and remove the device from mhi bus */ device_del(dev); put_device(dev); Loading