From 182ebe56742c3ffbdc724142a599fc5cf91542c7 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 10 Apr 2024 08:59:30 -0500 Subject: 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 Signed-off-by: Jassi Brar --- include/linux/omap-mailbox.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/linux/omap-mailbox.h') diff --git a/include/linux/omap-mailbox.h b/include/linux/omap-mailbox.h index 8aa984ec1f38..426a80fb32b5 100644 --- a/include/linux/omap-mailbox.h +++ b/include/linux/omap-mailbox.h @@ -20,7 +20,4 @@ struct mbox_client; struct mbox_chan *omap_mbox_request_channel(struct mbox_client *cl, const char *chan_name); -void omap_mbox_enable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq); -void omap_mbox_disable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq); - #endif /* OMAP_MAILBOX_H */ -- cgit v1.2.3-59-g8ed1b From 6faf89a89f45f649afd0d081fa99add399582595 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 10 Apr 2024 08:59:31 -0500 Subject: mailbox: omap: Remove unused omap_mbox_request_channel() function This function is not used, remove this function. Signed-off-by: Andrew Davis Signed-off-by: Jassi Brar --- drivers/mailbox/omap-mailbox.c | 36 ------------------------------------ include/linux/omap-mailbox.h | 6 ------ 2 files changed, 42 deletions(-) (limited to 'include/linux/omap-mailbox.h') diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 624a7ccc2728..8151722eef38 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b/drivers/mailbox/omap-mailbox.c @@ -389,42 +389,6 @@ static struct omap_mbox *omap_mbox_device_find(struct omap_mbox_device *mdev, return mbox; } -struct mbox_chan *omap_mbox_request_channel(struct mbox_client *cl, - const char *chan_name) -{ - struct device *dev = cl->dev; - struct omap_mbox *mbox = NULL; - struct omap_mbox_device *mdev; - int ret; - - if (!dev) - return ERR_PTR(-ENODEV); - - if (dev->of_node) { - pr_err("%s: please use mbox_request_channel(), this API is supported only for OMAP non-DT usage\n", - __func__); - return ERR_PTR(-ENODEV); - } - - mutex_lock(&omap_mbox_devices_lock); - list_for_each_entry(mdev, &omap_mbox_devices, elem) { - mbox = omap_mbox_device_find(mdev, chan_name); - if (mbox) - break; - } - mutex_unlock(&omap_mbox_devices_lock); - - if (!mbox || !mbox->chan) - return ERR_PTR(-ENOENT); - - ret = mbox_bind_client(mbox->chan, cl); - if (ret) - return ERR_PTR(ret); - - return mbox->chan; -} -EXPORT_SYMBOL(omap_mbox_request_channel); - static struct class omap_mbox_class = { .name = "mbox", }; static int omap_mbox_register(struct omap_mbox_device *mdev) diff --git a/include/linux/omap-mailbox.h b/include/linux/omap-mailbox.h index 426a80fb32b5..f8ddf8e81416 100644 --- a/include/linux/omap-mailbox.h +++ b/include/linux/omap-mailbox.h @@ -14,10 +14,4 @@ typedef int __bitwise omap_mbox_irq_t; #define IRQ_TX ((__force omap_mbox_irq_t) 1) #define IRQ_RX ((__force omap_mbox_irq_t) 2) -struct mbox_chan; -struct mbox_client; - -struct mbox_chan *omap_mbox_request_channel(struct mbox_client *cl, - const char *chan_name); - #endif /* OMAP_MAILBOX_H */ -- cgit v1.2.3-59-g8ed1b From 6979e8be50af143a373bf5905a176434a5880ca4 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 10 Apr 2024 08:59:32 -0500 Subject: mailbox: omap: Move omap_mbox_irq_t into driver This is only used internal to the driver, move it out of the public header and into the driver file. While we are here, this is not used as a bitwise, so drop that and make it a simple enum type. Signed-off-by: Andrew Davis Signed-off-by: Jassi Brar --- drivers/mailbox/omap-mailbox.c | 5 +++++ include/linux/omap-mailbox.h | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'include/linux/omap-mailbox.h') diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 8151722eef38..c083734b6954 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b/drivers/mailbox/omap-mailbox.c @@ -51,6 +51,11 @@ #define MBOX_INTR_CFG_TYPE1 0 #define MBOX_INTR_CFG_TYPE2 1 +typedef enum { + IRQ_TX = 1, + IRQ_RX = 2, +} omap_mbox_irq_t; + struct omap_mbox_fifo { unsigned long msg; unsigned long fifo_stat; diff --git a/include/linux/omap-mailbox.h b/include/linux/omap-mailbox.h index f8ddf8e81416..3cc5c4ed7f5a 100644 --- a/include/linux/omap-mailbox.h +++ b/include/linux/omap-mailbox.h @@ -10,8 +10,4 @@ typedef uintptr_t mbox_msg_t; #define omap_mbox_message(data) (u32)(mbox_msg_t)(data) -typedef int __bitwise omap_mbox_irq_t; -#define IRQ_TX ((__force omap_mbox_irq_t) 1) -#define IRQ_RX ((__force omap_mbox_irq_t) 2) - #endif /* OMAP_MAILBOX_H */ -- cgit v1.2.3-59-g8ed1b