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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 23, 2023 at 09:14:27AM +0100, Ahmad Fatoum wrote:
> 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@xxxxxxxxxxxxxx>
> ---
> Please order before
> https://lore.barebox.org/barebox/20231122171320.1714868-1-a.fatoum@xxxxxxxxxxxxxx/T/#t
> ---
>  drivers/mci/pxamci.c                | 4 ++--
>  drivers/usb/gadget/udc/pxa27x_udc.c | 8 ++++----
>  2 files changed, 6 insertions(+), 6 deletions(-)

Applied, thanks

Sascha

> 
> 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
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux