From: OGAWA Hirofumi Date: Tue, 3 Oct 2006 08:14:03 +0000 (-0700) Subject: [PATCH] pata_hpt366: fix typo X-Git-Tag: v2.6.19-rc1~348 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2c136efcf6f58d07512c4df83eb494597fe0d229;p=linux-2.6-omap-h63xx.git [PATCH] pata_hpt366: fix typo switch(reg1 & 0x700) { case 5: info_hpt366.private_data = &hpt366_40; break; case 9: info_hpt366.private_data = &hpt366_25; break; default: info_hpt366.private_data = &hpt366_33; break; } The above runs always default part. It should be "(reg1 & 0x700) >> 8". Signed-off-by: OGAWA Hirofumi Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c index cf656ecbe50..8c757438f35 100644 --- a/drivers/ata/pata_hpt366.c +++ b/drivers/ata/pata_hpt366.c @@ -429,7 +429,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) /* PCI clocking determines the ATA timing values to use */ /* info_hpt366 is safe against re-entry so we can scribble on it */ - switch(reg1 & 0x700) { + switch((reg1 & 0x700) >> 8) { case 5: info_hpt366.private_data = &hpt366_40; break;