Commit 90445763 authored by Florian Fainelli's avatar Florian Fainelli Committed by Thomas Bogendoerfer

MIPS: Make phys_to_virt utilize __va()

The implementation is exactly the same, so avoid open-coding it in two
different locations.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarSerge Semin <fancer.lancer@gmail.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 8baa6512
...@@ -131,7 +131,7 @@ static inline phys_addr_t virt_to_phys(const volatile void *x) ...@@ -131,7 +131,7 @@ static inline phys_addr_t virt_to_phys(const volatile void *x)
*/ */
static inline void * phys_to_virt(unsigned long address) static inline void * phys_to_virt(unsigned long address)
{ {
return (void *)(address + PAGE_OFFSET - PHYS_OFFSET); return __va(address);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment