]> git.hungrycats.org Git - linux/commit
[PATCH] Fix imm.c again
authorAndrew Morton <akpm@osdl.org>
Tue, 9 Sep 2003 17:19:28 +0000 (10:19 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 9 Sep 2003 17:19:28 +0000 (10:19 -0700)
commit94c5d6ebe11a45c7d8738af476df38405a766384
tree0f36b845b406ff211c31e2c64cdd2fd79b8a648f
parent3198c19ab7ae0bddf2ee031ea7841cc87b891565
[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",
};
drivers/scsi/imm.h