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

Becky Bruce beckyb at kernel.crashing.org
Wed Jun 2 17:39:33 CEST 2010


On May 31, 2010, at 12:48 PM, Remy Bohmer wrote:

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

There was already a "ohci.h" in this directory, so I'll move it there.

Thanks,
Becky


More information about the U-Boot mailing list