Skip to content

Commit e8d1591

Browse files
committed
soc: apple: rtkit: Get rid of apple_rtkit_send_message_wait
It is fundamentally broken and has no users. Just remove it. Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 99925e4 commit e8d1591

2 files changed

Lines changed: 0 additions & 50 deletions

File tree

drivers/soc/apple/rtkit.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -641,38 +641,6 @@ int apple_rtkit_send_message(struct apple_rtkit *rtk, u8 ep, u64 message,
641641
}
642642
EXPORT_SYMBOL_GPL(apple_rtkit_send_message);
643643

644-
int apple_rtkit_send_message_wait(struct apple_rtkit *rtk, u8 ep, u64 message,
645-
unsigned long timeout, bool atomic)
646-
{
647-
DECLARE_COMPLETION_ONSTACK(completion);
648-
int ret;
649-
long t;
650-
651-
ret = apple_rtkit_send_message(rtk, ep, message, &completion, atomic);
652-
if (ret < 0)
653-
return ret;
654-
655-
if (atomic) {
656-
ret = mbox_flush(rtk->mbox_chan, timeout);
657-
if (ret < 0)
658-
return ret;
659-
660-
if (try_wait_for_completion(&completion))
661-
return 0;
662-
663-
return -ETIME;
664-
} else {
665-
t = wait_for_completion_interruptible_timeout(
666-
&completion, msecs_to_jiffies(timeout));
667-
if (t < 0)
668-
return t;
669-
else if (t == 0)
670-
return -ETIME;
671-
return 0;
672-
}
673-
}
674-
EXPORT_SYMBOL_GPL(apple_rtkit_send_message_wait);
675-
676644
int apple_rtkit_poll(struct apple_rtkit *rtk)
677645
{
678646
return mbox_client_peek_data(rtk->mbox_chan);

include/linux/soc/apple/rtkit.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -160,24 +160,6 @@ int apple_rtkit_start_ep(struct apple_rtkit *rtk, u8 endpoint);
160160
int apple_rtkit_send_message(struct apple_rtkit *rtk, u8 ep, u64 message,
161161
struct completion *completion, bool atomic);
162162

163-
/*
164-
* Send a message to the given endpoint and wait until it has been submitted
165-
* to the hardware FIFO.
166-
* Will return zero on success and a negative error code on failure
167-
* (e.g. -ETIME when the message couldn't be written within the given
168-
* timeout)
169-
*
170-
* @rtk: RTKit reference
171-
* @ep: target endpoint
172-
* @message: message to be sent
173-
* @timeout: timeout in milliseconds to allow the message transmission
174-
* to be completed
175-
* @atomic: if set to true this function can be called from atomic
176-
* context.
177-
*/
178-
int apple_rtkit_send_message_wait(struct apple_rtkit *rtk, u8 ep, u64 message,
179-
unsigned long timeout, bool atomic);
180-
181163
/*
182164
* Process incoming messages in atomic context.
183165
* This only guarantees that messages arrive as far as the recv_message_early

0 commit comments

Comments
 (0)