Skip to content

Commit 32051cb

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 <[email protected]>
1 parent da07643 commit 32051cb

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
@@ -629,38 +629,6 @@ int apple_rtkit_send_message(struct apple_rtkit *rtk, u8 ep, u64 message,
629629
}
630630
EXPORT_SYMBOL_GPL(apple_rtkit_send_message);
631631

632-
int apple_rtkit_send_message_wait(struct apple_rtkit *rtk, u8 ep, u64 message,
633-
unsigned long timeout, bool atomic)
634-
{
635-
DECLARE_COMPLETION_ONSTACK(completion);
636-
int ret;
637-
long t;
638-
639-
ret = apple_rtkit_send_message(rtk, ep, message, &completion, atomic);
640-
if (ret < 0)
641-
return ret;
642-
643-
if (atomic) {
644-
ret = mbox_flush(rtk->mbox_chan, timeout);
645-
if (ret < 0)
646-
return ret;
647-
648-
if (try_wait_for_completion(&completion))
649-
return 0;
650-
651-
return -ETIME;
652-
} else {
653-
t = wait_for_completion_interruptible_timeout(
654-
&completion, msecs_to_jiffies(timeout));
655-
if (t < 0)
656-
return t;
657-
else if (t == 0)
658-
return -ETIME;
659-
return 0;
660-
}
661-
}
662-
EXPORT_SYMBOL_GPL(apple_rtkit_send_message_wait);
663-
664632
int apple_rtkit_poll(struct apple_rtkit *rtk)
665633
{
666634
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)