]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.16.3/sh-fix-build-error-by-adding-generic-ioport_-map-unmap.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.16.3 / sh-fix-build-error-by-adding-generic-ioport_-map-unmap.patch
1 From e04aca4a769e16cf4f9b8a4bd3e761711640dc46 Mon Sep 17 00:00:00 2001
2 From: Pranith Kumar <bobby.prani@gmail.com>
3 Date: Wed, 6 Aug 2014 16:03:48 -0700
4 Subject: sh: fix build error by adding generic ioport_{map/unmap}()
5
6 From: Pranith Kumar <bobby.prani@gmail.com>
7
8 commit e04aca4a769e16cf4f9b8a4bd3e761711640dc46 upstream.
9
10 Fix build error as reported by Geert Uytterhoeven here:
11
12 http://kisskb.ellerman.id.au/kisskb/buildresult/11607865/
13
14 The error happens when CONFIG_HAS_IOPORT_MAP=n because of which there
15 are missing definitions of ioport_map/unmap(). Fix this build error by
16 adding these prototypes.
17
18 Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
19 Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
20 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
21 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24 ---
25 arch/sh/include/asm/io_noioport.h | 11 +++++++++++
26 1 file changed, 11 insertions(+)
27
28 --- a/arch/sh/include/asm/io_noioport.h
29 +++ b/arch/sh/include/asm/io_noioport.h
30 @@ -34,6 +34,17 @@ static inline void outl(unsigned int x,
31 BUG();
32 }
33
34 +static inline void __iomem *ioport_map(unsigned long port, unsigned int size)
35 +{
36 + BUG();
37 + return NULL;
38 +}
39 +
40 +static inline void ioport_unmap(void __iomem *addr)
41 +{
42 + BUG();
43 +}
44 +
45 #define inb_p(addr) inb(addr)
46 #define inw_p(addr) inw(addr)
47 #define inl_p(addr) inl(addr)