Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bus: mhi: host: Remove unused functions

mhi_device_get() and mhi_queue_dma() haven't been used since 2020's
commit 189ff97cca53 ("bus: mhi: core: Add support for data transfer")
added them.

Remove them.

Note that mhi_queue_dma_sync() is used and has been left.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20250127215859.261105-1-linux@treblig.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

authored by

Dr. David Alan Gilbert and committed by
Manivannan Sadhasivam
c8006fbd 2014c95a

-51
-19
drivers/bus/mhi/host/main.c
··· 1181 1181 } 1182 1182 EXPORT_SYMBOL_GPL(mhi_queue_skb); 1183 1183 1184 - int mhi_queue_dma(struct mhi_device *mhi_dev, enum dma_data_direction dir, 1185 - struct mhi_buf *mhi_buf, size_t len, enum mhi_flags mflags) 1186 - { 1187 - struct mhi_chan *mhi_chan = (dir == DMA_TO_DEVICE) ? mhi_dev->ul_chan : 1188 - mhi_dev->dl_chan; 1189 - struct mhi_buf_info buf_info = { }; 1190 - 1191 - buf_info.p_addr = mhi_buf->dma_addr; 1192 - buf_info.cb_buf = mhi_buf; 1193 - buf_info.pre_mapped = true; 1194 - buf_info.len = len; 1195 - 1196 - if (unlikely(mhi_chan->pre_alloc)) 1197 - return -EINVAL; 1198 - 1199 - return mhi_queue(mhi_dev, &buf_info, dir, mflags); 1200 - } 1201 - EXPORT_SYMBOL_GPL(mhi_queue_dma); 1202 - 1203 1184 int mhi_gen_tre(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan, 1204 1185 struct mhi_buf_info *info, enum mhi_flags flags) 1205 1186 {
-14
drivers/bus/mhi/host/pm.c
··· 1296 1296 } 1297 1297 EXPORT_SYMBOL_GPL(mhi_force_rddm_mode); 1298 1298 1299 - void mhi_device_get(struct mhi_device *mhi_dev) 1300 - { 1301 - struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl; 1302 - 1303 - mhi_dev->dev_wake++; 1304 - read_lock_bh(&mhi_cntrl->pm_lock); 1305 - if (MHI_PM_IN_SUSPEND_STATE(mhi_cntrl->pm_state)) 1306 - mhi_trigger_resume(mhi_cntrl); 1307 - 1308 - mhi_cntrl->wake_get(mhi_cntrl, true); 1309 - read_unlock_bh(&mhi_cntrl->pm_lock); 1310 - } 1311 - EXPORT_SYMBOL_GPL(mhi_device_get); 1312 - 1313 1299 int mhi_device_get_sync(struct mhi_device *mhi_dev) 1314 1300 { 1315 1301 struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl;
-18
include/linux/mhi.h
··· 721 721 void mhi_soc_reset(struct mhi_controller *mhi_cntrl); 722 722 723 723 /** 724 - * mhi_device_get - Disable device low power mode 725 - * @mhi_dev: Device associated with the channel 726 - */ 727 - void mhi_device_get(struct mhi_device *mhi_dev); 728 - 729 - /** 730 724 * mhi_device_get_sync - Disable device low power mode. Synchronously 731 725 * take the controller out of suspended state 732 726 * @mhi_dev: Device associated with the channel ··· 769 775 * @mhi_dev: Device associated with the channels 770 776 */ 771 777 void mhi_unprepare_from_transfer(struct mhi_device *mhi_dev); 772 - 773 - /** 774 - * mhi_queue_dma - Send or receive DMA mapped buffers from client device 775 - * over MHI channel 776 - * @mhi_dev: Device associated with the channels 777 - * @dir: DMA direction for the channel 778 - * @mhi_buf: Buffer for holding the DMA mapped data 779 - * @len: Buffer length 780 - * @mflags: MHI transfer flags used for the transfer 781 - */ 782 - int mhi_queue_dma(struct mhi_device *mhi_dev, enum dma_data_direction dir, 783 - struct mhi_buf *mhi_buf, size_t len, enum mhi_flags mflags); 784 778 785 779 /** 786 780 * mhi_queue_buf - Send or receive raw buffers from client device over MHI