mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] drivers: pxa: don't define clk_enable/clk_disable with different prototype
Date: Thu, 23 Nov 2023 15:53:47 +0100	[thread overview]
Message-ID: <20231123145347.GN3359458@pengutronix.de> (raw)
In-Reply-To: <20231123081427.1084418-1-a.fatoum@pengutronix.de>

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@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(-)

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 |



      reply	other threads:[~2023-11-23 14:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23  8:14 Ahmad Fatoum
2023-11-23 14:53 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231123145347.GN3359458@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox