[U-Boot] [PATCH 02/10] drivers/usb/host/ohci-hcd: undef readl/writel before redefining

Remy Bohmer linux at bohmer.net
Mon May 31 19:48:02 CEST 2010


Hi,

2010/5/28 Becky Bruce <beckyb at kernel.crashing.org>:
> This avoids a build warning that you see if anyone in the
> header chain has included io.h (which is coming shortly)
>
> Signed-off-by: Becky Bruce <beckyb at kernel.crashing.org>
> ---
>  drivers/usb/host/ohci-hcd.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
> index b03a600..d7e5bd5 100644
> --- a/drivers/usb/host/ohci-hcd.c
> +++ b/drivers/usb/host/ohci-hcd.c
> @@ -86,6 +86,8 @@
>  /*
>  * e.g. PCI controllers need this
>  */
> +#undef readl
> +#undef writel
>  #ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
>  # define readl(a) __swap_32(*((volatile u32 *)(a)))
>  # define writel(a, b) (*((volatile u32 *)(b)) = __swap_32((volatile u32)a))

IMO it would be cleaner if these macros are moved to some generic
header file and include that header in this file.

Kind regards,

Remy


More information about the U-Boot mailing list