Commit 6cad75a6 authored by Jeff Garzik's avatar Jeff Garzik Committed by James Bottomley

[SCSI] fdomain: fix PCMCIA-related warnings

fdomain is one of those drivers that is compiled twice, once for PCMCIA
and once for non-PCMCIA.  The resultant two-driver setup leaves a bit of
dead code and data in the non-PCMCIA case, which gcc complains about.

Shuffle ifdefs a bit to eliminate the conditionally-dead code, and
the compiler warnings.
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 565bae6a
...@@ -410,6 +410,8 @@ static irqreturn_t do_fdomain_16x0_intr( int irq, void *dev_id ); ...@@ -410,6 +410,8 @@ static irqreturn_t do_fdomain_16x0_intr( int irq, void *dev_id );
static char * fdomain = NULL; static char * fdomain = NULL;
module_param(fdomain, charp, 0); module_param(fdomain, charp, 0);
#ifndef PCMCIA
static unsigned long addresses[] = { static unsigned long addresses[] = {
0xc8000, 0xc8000,
0xca000, 0xca000,
...@@ -426,6 +428,8 @@ static unsigned short ports[] = { 0x140, 0x150, 0x160, 0x170 }; ...@@ -426,6 +428,8 @@ static unsigned short ports[] = { 0x140, 0x150, 0x160, 0x170 };
static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 }; static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 };
#endif /* !PCMCIA */
/* /*
READ THIS BEFORE YOU ADD A SIGNATURE! READ THIS BEFORE YOU ADD A SIGNATURE!
...@@ -458,6 +462,8 @@ static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 }; ...@@ -458,6 +462,8 @@ static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 };
*/ */
#ifndef PCMCIA
static struct signature { static struct signature {
const char *signature; const char *signature;
int sig_offset; int sig_offset;
...@@ -503,6 +509,8 @@ static struct signature { ...@@ -503,6 +509,8 @@ static struct signature {
#define SIGNATURE_COUNT ARRAY_SIZE(signatures) #define SIGNATURE_COUNT ARRAY_SIZE(signatures)
#endif /* !PCMCIA */
static void print_banner( struct Scsi_Host *shpnt ) static void print_banner( struct Scsi_Host *shpnt )
{ {
if (!shpnt) return; /* This won't ever happen */ if (!shpnt) return; /* This won't ever happen */
...@@ -633,6 +641,8 @@ static int fdomain_test_loopback( void ) ...@@ -633,6 +641,8 @@ static int fdomain_test_loopback( void )
return 0; return 0;
} }
#ifndef PCMCIA
/* fdomain_get_irq assumes that we have a valid MCA ID for a /* fdomain_get_irq assumes that we have a valid MCA ID for a
TMC-1660/TMC-1680 Future Domain board. Now, check to be sure the TMC-1660/TMC-1680 Future Domain board. Now, check to be sure the
bios_base matches these ports. If someone was unlucky enough to have bios_base matches these ports. If someone was unlucky enough to have
...@@ -667,7 +677,6 @@ static int fdomain_get_irq( int base ) ...@@ -667,7 +677,6 @@ static int fdomain_get_irq( int base )
static int fdomain_isa_detect( int *irq, int *iobase ) static int fdomain_isa_detect( int *irq, int *iobase )
{ {
#ifndef PCMCIA
int i, j; int i, j;
int base = 0xdeadbeef; int base = 0xdeadbeef;
int flag = 0; int flag = 0;
...@@ -786,11 +795,22 @@ static int fdomain_isa_detect( int *irq, int *iobase ) ...@@ -786,11 +795,22 @@ static int fdomain_isa_detect( int *irq, int *iobase )
*iobase = base; *iobase = base;
return 1; /* success */ return 1; /* success */
#else
return 0;
#endif
} }
#else /* PCMCIA */
static int fdomain_isa_detect( int *irq, int *iobase )
{
if (irq)
*irq = 0;
if (iobase)
*iobase = 0;
return 0;
}
#endif /* !PCMCIA */
/* PCI detection function: int fdomain_pci_bios_detect(int* irq, int* /* PCI detection function: int fdomain_pci_bios_detect(int* irq, int*
iobase) This function gets the Interrupt Level and I/O base address from iobase) This function gets the Interrupt Level and I/O base address from
the PCI configuration registers. */ the PCI configuration registers. */
......
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