Skip to content

Commit

Permalink
frv: hide uncached_access() when pgprot_noncached is not #defined
Browse files Browse the repository at this point in the history
Hide uncached_access() when pgprot_noncached is not #defined.  This prevents
the following warning:

	  CC      drivers/char/mem.o
	drivers/char/mem.c:229: warning: 'uncached_access' defined but not used

Repairs d7d4d84 ("drivers/char/mem.c:
cleanups").

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Howells authored and Linus Torvalds committed Apr 7, 2010
1 parent c783a29 commit ea56f41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/char/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ int __weak phys_mem_access_prot_allowed(struct file *file,
* outside of main memory.
*
*/
#ifdef pgprot_noncached
static int uncached_access(struct file *file, unsigned long addr)
{
#if defined(CONFIG_IA64)
Expand All @@ -251,6 +252,7 @@ static int uncached_access(struct file *file, unsigned long addr)
return addr >= __pa(high_memory);
#endif
}
#endif

static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
unsigned long size, pgprot_t vma_prot)
Expand Down

0 comments on commit ea56f41

Please sign in to comment.