[PATCH] drivers: pxa: don't define clk_enable/clk_disable with different prototype

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Nov 23 00:14:27 PST 2023


Even on platforms without CCF support, clk_enable and clk_disable are
defined as stubs. Defining functions with the same name can thus clash
with these definitions, e.g. if <linux/clk.h> is included from a new
header. Fix this by renaming the functions.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
Please order before
https://lore.barebox.org/barebox/20231122171320.1714868-1-a.fatoum@pengutronix.de/T/#t
---
 drivers/mci/pxamci.c                | 4 ++--
 drivers/usb/gadget/udc/pxa27x_udc.c | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mci/pxamci.c b/drivers/mci/pxamci.c
index 8d8e9e88bb5c..5df1ef5cb6fb 100644
--- a/drivers/mci/pxamci.c
+++ b/drivers/mci/pxamci.c
@@ -26,7 +26,7 @@
 #define TX_TIMEOUT (250 * MSECOND)
 #define CMD_TIMEOUT (100 * MSECOND)
 
-static void clk_enable(void)
+static void mmc_clk_enable(void)
 {
 	CKEN |= CKEN_MMC;
 }
@@ -334,7 +334,7 @@ static int pxamci_probe(struct device *dev)
 	struct pxamci_host *host;
 	int gpio_power = -1;
 
-	clk_enable();
+	mmc_clk_enable();
 	host = xzalloc(sizeof(*host));
 	iores = dev_request_mem_resource(dev, 0);
 	if (IS_ERR(iores))
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 67b7e28de9d2..20148f48783d 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -882,12 +882,12 @@ static const struct usb_gadget_ops pxa_udc_ops = {
 	.udc_poll	= pxa_udc_gadget_poll,
 };
 
-static void clk_enable(void)
+static void usb_clk_enable(void)
 {
 	CKEN |= CKEN_USB;
 }
 
-static void clk_disable(void)
+static void usb_clk_disable(void)
 {
 	CKEN &= ~CKEN_USB;
 }
@@ -901,7 +901,7 @@ static void udc_disable(struct pxa_udc *udc)
 	udc_writel(udc, UDCICR1, 0);
 
 	udc_clear_mask_UDCCR(udc, UDCCR_UDE);
-	clk_disable();
+	usb_clk_disable();
 
 	ep0_idle(udc);
 	udc->gadget.speed = USB_SPEED_UNKNOWN;
@@ -946,7 +946,7 @@ static void udc_enable(struct pxa_udc *udc)
 	udc_writel(udc, UDCICR1, 0);
 	udc_clear_mask_UDCCR(udc, UDCCR_UDE);
 
-	clk_enable();
+	usb_clk_enable();
 
 	ep0_idle(udc);
 	udc->gadget.speed = USB_SPEED_FULL;
-- 
2.39.2




More information about the barebox mailing list