aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68knommu/uaccess.h
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@snapgear.com>2007-07-19 04:49:15 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:51 -0400
commit10146801e8b960d7473e350b60458d9d5a2be1cf (patch)
tree98b42daabeda36e89202265dd2e83c9d4703602a /include/asm-m68knommu/uaccess.h
parenta4c8b9159000018b0c641b844795a4de4e954582 (diff)
m68knommu: remove is_in_rom() function
Remove is_in_rom() function. It doesn't actually serve the purpose it was intended to. If you look at the use of it _access_ok() (which is the only use of it) then it is obvious that most of memory is marked as access_ok. No point having is_in_rom() then, so remove it. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-m68knommu/uaccess.h')
-rw-r--r--include/asm-m68knommu/uaccess.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/asm-m68knommu/uaccess.h b/include/asm-m68knommu/uaccess.h
index 62b29b10bc6d..9ed9169a8849 100644
--- a/include/asm-m68knommu/uaccess.h
+++ b/include/asm-m68knommu/uaccess.h
@@ -15,12 +15,15 @@
15 15
16#define access_ok(type,addr,size) _access_ok((unsigned long)(addr),(size)) 16#define access_ok(type,addr,size) _access_ok((unsigned long)(addr),(size))
17 17
18/*
19 * It is not enough to just have access_ok check for a real RAM address.
20 * This would disallow the case of code/ro-data running XIP in flash/rom.
21 * Ideally we would check the possible flash ranges too, but that is
22 * currently not so easy.
23 */
18static inline int _access_ok(unsigned long addr, unsigned long size) 24static inline int _access_ok(unsigned long addr, unsigned long size)
19{ 25{
20 extern unsigned long memory_start, memory_end; 26 return 1;
21
22 return (((addr >= memory_start) && (addr+size < memory_end)) ||
23 (is_in_rom(addr) && is_in_rom(addr+size)));
24} 27}
25 28
26/* 29/*