Commit 94c5d6eb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix imm.c again

From: Adrian Bunk <bunk@fs.tum.de>

Earlier patch wasn't correct especially in the !CONFIG_SCSI_IZIP_EPP16
case, reading all uses of this array (IMM_MODE_STRING is used to print the
corresponding string in printks).

If I'm not misunderstanding it, CONFIG_SCSI_IZIP_EPP16 means "use 16bit 
even when 32bit is requested".

It seems the right solution is

static char *IMM_MODE_STRING[] =
{
        [IMM_AUTODETECT] = "Autodetect",
        [IMM_NIBBLE]     = "SPP",
        [IMM_PS2]        = "PS/2",
        [IMM_EPP_8]      = "EPP 8 bit",
        [IMM_EPP_16]     = "EPP 16 bit",
#ifdef CONFIG_SCSI_IZIP_EPP16
        [IMM_EPP_32]     = "EPP 16 bit",
#else
        [IMM_EPP_32]     = "EPP 32 bit",
#endif
        [IMM_UNKNOWN]    = "Unknown",
};
parent 3198c19a
......@@ -100,8 +100,9 @@ static char *IMM_MODE_STRING[] =
[IMM_NIBBLE] = "SPP",
[IMM_PS2] = "PS/2",
[IMM_EPP_8] = "EPP 8 bit",
#ifdef CONFIG_SCSI_IZIP_EPP16
[IMM_EPP_16] = "EPP 16 bit",
#ifdef CONFIG_SCSI_IZIP_EPP16
[IMM_EPP_32] = "EPP 16 bit",
#else
[IMM_EPP_32] = "EPP 32 bit",
#endif
......
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