Skip to content

Commit 182ebe5

Browse files
glneoJassi Brar
authored andcommitted
mailbox: omap: Remove unused omap_mbox_{enable,disable}_irq() functions
These function are not used, remove these here. While here, remove the leading _ from the driver internal functions that do the same thing as the functions removed. Signed-off-by: Andrew Davis <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent 0ac39d8 commit 182ebe5

File tree

2 files changed

+10
-35
lines changed

2 files changed

+10
-35
lines changed

drivers/mailbox/omap-mailbox.c

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static int is_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
197197
return (int)(enable & status & bit);
198198
}
199199

200-
static void _omap_mbox_enable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
200+
static void omap_mbox_enable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
201201
{
202202
u32 l;
203203
struct omap_mbox_fifo *fifo = (irq == IRQ_TX) ?
@@ -210,7 +210,7 @@ static void _omap_mbox_enable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
210210
mbox_write_reg(mbox->parent, l, irqenable);
211211
}
212212

213-
static void _omap_mbox_disable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
213+
static void omap_mbox_disable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
214214
{
215215
struct omap_mbox_fifo *fifo = (irq == IRQ_TX) ?
216216
&mbox->tx_fifo : &mbox->rx_fifo;
@@ -227,28 +227,6 @@ static void _omap_mbox_disable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
227227
mbox_write_reg(mbox->parent, bit, irqdisable);
228228
}
229229

230-
void omap_mbox_enable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq)
231-
{
232-
struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
233-
234-
if (WARN_ON(!mbox))
235-
return;
236-
237-
_omap_mbox_enable_irq(mbox, irq);
238-
}
239-
EXPORT_SYMBOL(omap_mbox_enable_irq);
240-
241-
void omap_mbox_disable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq)
242-
{
243-
struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
244-
245-
if (WARN_ON(!mbox))
246-
return;
247-
248-
_omap_mbox_disable_irq(mbox, irq);
249-
}
250-
EXPORT_SYMBOL(omap_mbox_disable_irq);
251-
252230
/*
253231
* Message receiver(workqueue)
254232
*/
@@ -269,7 +247,7 @@ static void mbox_rx_work(struct work_struct *work)
269247
spin_lock_irq(&mq->lock);
270248
if (mq->full) {
271249
mq->full = false;
272-
_omap_mbox_enable_irq(mq->mbox, IRQ_RX);
250+
omap_mbox_enable_irq(mq->mbox, IRQ_RX);
273251
}
274252
spin_unlock_irq(&mq->lock);
275253
}
@@ -280,7 +258,7 @@ static void mbox_rx_work(struct work_struct *work)
280258
*/
281259
static void __mbox_tx_interrupt(struct omap_mbox *mbox)
282260
{
283-
_omap_mbox_disable_irq(mbox, IRQ_TX);
261+
omap_mbox_disable_irq(mbox, IRQ_TX);
284262
ack_mbox_irq(mbox, IRQ_TX);
285263
mbox_chan_txdone(mbox->chan, 0);
286264
}
@@ -293,7 +271,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
293271

294272
while (!mbox_fifo_empty(mbox)) {
295273
if (unlikely(kfifo_avail(&mq->fifo) < sizeof(msg))) {
296-
_omap_mbox_disable_irq(mbox, IRQ_RX);
274+
omap_mbox_disable_irq(mbox, IRQ_RX);
297275
mq->full = true;
298276
goto nomem;
299277
}
@@ -375,7 +353,7 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
375353
if (mbox->send_no_irq)
376354
mbox->chan->txdone_method = TXDONE_BY_ACK;
377355

378-
_omap_mbox_enable_irq(mbox, IRQ_RX);
356+
omap_mbox_enable_irq(mbox, IRQ_RX);
379357

380358
return 0;
381359

@@ -386,7 +364,7 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
386364

387365
static void omap_mbox_fini(struct omap_mbox *mbox)
388366
{
389-
_omap_mbox_disable_irq(mbox, IRQ_RX);
367+
omap_mbox_disable_irq(mbox, IRQ_RX);
390368
free_irq(mbox->irq, mbox);
391369
flush_work(&mbox->rxq->work);
392370
mbox_queue_free(mbox->rxq);
@@ -533,10 +511,10 @@ static int omap_mbox_chan_send_noirq(struct omap_mbox *mbox, u32 msg)
533511
int ret = -EBUSY;
534512

535513
if (!mbox_fifo_full(mbox)) {
536-
_omap_mbox_enable_irq(mbox, IRQ_RX);
514+
omap_mbox_enable_irq(mbox, IRQ_RX);
537515
mbox_fifo_write(mbox, msg);
538516
ret = 0;
539-
_omap_mbox_disable_irq(mbox, IRQ_RX);
517+
omap_mbox_disable_irq(mbox, IRQ_RX);
540518

541519
/* we must read and ack the interrupt directly from here */
542520
mbox_fifo_read(mbox);
@@ -556,7 +534,7 @@ static int omap_mbox_chan_send(struct omap_mbox *mbox, u32 msg)
556534
}
557535

558536
/* always enable the interrupt */
559-
_omap_mbox_enable_irq(mbox, IRQ_TX);
537+
omap_mbox_enable_irq(mbox, IRQ_TX);
560538
return ret;
561539
}
562540

include/linux/omap-mailbox.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,4 @@ struct mbox_client;
2020
struct mbox_chan *omap_mbox_request_channel(struct mbox_client *cl,
2121
const char *chan_name);
2222

23-
void omap_mbox_enable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq);
24-
void omap_mbox_disable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq);
25-
2623
#endif /* OMAP_MAILBOX_H */

0 commit comments

Comments
 (0)