Skip to content

Commit c8006fb

Browse files
Dr. David Alan GilbertMani-Sadhasivam
authored andcommitted
bus: mhi: host: Remove unused functions
mhi_device_get() and mhi_queue_dma() haven't been used since 2020's commit 189ff97 ("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 <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Manivannan Sadhasivam <[email protected]>
1 parent 2014c95 commit c8006fb

File tree

3 files changed

+0
-51
lines changed

3 files changed

+0
-51
lines changed

drivers/bus/mhi/host/main.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,25 +1181,6 @@ int mhi_queue_skb(struct mhi_device *mhi_dev, enum dma_data_direction dir,
11811181
}
11821182
EXPORT_SYMBOL_GPL(mhi_queue_skb);
11831183

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-
12031184
int mhi_gen_tre(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan,
12041185
struct mhi_buf_info *info, enum mhi_flags flags)
12051186
{

drivers/bus/mhi/host/pm.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,20 +1296,6 @@ int mhi_force_rddm_mode(struct mhi_controller *mhi_cntrl)
12961296
}
12971297
EXPORT_SYMBOL_GPL(mhi_force_rddm_mode);
12981298

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-
13131299
int mhi_device_get_sync(struct mhi_device *mhi_dev)
13141300
{
13151301
struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl;

include/linux/mhi.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -720,12 +720,6 @@ enum mhi_state mhi_get_mhi_state(struct mhi_controller *mhi_cntrl);
720720
*/
721721
void mhi_soc_reset(struct mhi_controller *mhi_cntrl);
722722

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-
729723
/**
730724
* mhi_device_get_sync - Disable device low power mode. Synchronously
731725
* take the controller out of suspended state
@@ -776,18 +770,6 @@ int mhi_prepare_for_transfer_autoqueue(struct mhi_device *mhi_dev);
776770
*/
777771
void mhi_unprepare_from_transfer(struct mhi_device *mhi_dev);
778772

779-
/**
780-
* mhi_queue_dma - Send or receive DMA mapped buffers from client device
781-
* over MHI channel
782-
* @mhi_dev: Device associated with the channels
783-
* @dir: DMA direction for the channel
784-
* @mhi_buf: Buffer for holding the DMA mapped data
785-
* @len: Buffer length
786-
* @mflags: MHI transfer flags used for the transfer
787-
*/
788-
int mhi_queue_dma(struct mhi_device *mhi_dev, enum dma_data_direction dir,
789-
struct mhi_buf *mhi_buf, size_t len, enum mhi_flags mflags);
790-
791773
/**
792774
* mhi_queue_buf - Send or receive raw buffers from client device over MHI
793775
* channel

0 commit comments

Comments
 (0)