Commit 4eea67a3 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Stefan Bader

isdn: sc: work around type mismatch warning

BugLink: http://bugs.launchpad.net/bugs/1756866

This driver shows warnings on many architectures:

drivers/isdn/sc/init.c: In function 'identify_board':
drivers/isdn/sc/init.c:484:2: error: passing argument 1 of 'readl' makes pointer from integer without a cast [-Werror]

In newer kernels, it was completely removed, but for the 4.4-stable
series, let's just shut up that warning by adding an extra variable
to do the necessary type cast.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 23f47cd1
...@@ -441,6 +441,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) ...@@ -441,6 +441,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase)
RspMessage rcvmsg; RspMessage rcvmsg;
ReqMessage sndmsg; ReqMessage sndmsg;
HWConfig_pl hwci; HWConfig_pl hwci;
void __iomem *rambase_sig = (void __iomem *)rambase + SIG_OFFSET;
int x; int x;
pr_debug("Attempting to identify adapter @ 0x%lx io 0x%x\n", pr_debug("Attempting to identify adapter @ 0x%lx io 0x%x\n",
...@@ -481,7 +482,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) ...@@ -481,7 +482,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase)
*/ */
outb(PRI_BASEPG_VAL, pgport); outb(PRI_BASEPG_VAL, pgport);
msleep_interruptible(1000); msleep_interruptible(1000);
sig = readl(rambase + SIG_OFFSET); sig = readl(rambase_sig);
pr_debug("Looking for a signature, got 0x%lx\n", sig); pr_debug("Looking for a signature, got 0x%lx\n", sig);
if (sig == SIGNATURE) if (sig == SIGNATURE)
return PRI_BOARD; return PRI_BOARD;
...@@ -491,7 +492,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) ...@@ -491,7 +492,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase)
*/ */
outb(BRI_BASEPG_VAL, pgport); outb(BRI_BASEPG_VAL, pgport);
msleep_interruptible(1000); msleep_interruptible(1000);
sig = readl(rambase + SIG_OFFSET); sig = readl(rambase_sig);
pr_debug("Looking for a signature, got 0x%lx\n", sig); pr_debug("Looking for a signature, got 0x%lx\n", sig);
if (sig == SIGNATURE) if (sig == SIGNATURE)
return BRI_BOARD; return BRI_BOARD;
...@@ -501,7 +502,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase) ...@@ -501,7 +502,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase)
/* /*
* Try to spot a card * Try to spot a card
*/ */
sig = readl(rambase + SIG_OFFSET); sig = readl(rambase_sig);
pr_debug("Looking for a signature, got 0x%lx\n", sig); pr_debug("Looking for a signature, got 0x%lx\n", sig);
if (sig != SIGNATURE) if (sig != SIGNATURE)
return -1; return -1;
......
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