diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-19 20:25:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-19 20:25:28 -0400 |
commit | 2b858bd02ffca71391161f5709588fc70da79531 (patch) | |
tree | 5652cdcc7c5307d4ebf2eb029e542b731a7243e5 /drivers | |
parent | 93cd791e02bbdb504aba024a14fdc07fe246bc71 (diff) | |
parent | f3769e9db11df38c211881a5f11b2e38a8e4477a (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
pata_sis: Fix oops on boot
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/pata_sis.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index f48207865930..8dc3bc4f5863 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
@@ -878,6 +878,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
878 | struct ata_port_info *port; | 878 | struct ata_port_info *port; |
879 | struct pci_dev *host = NULL; | 879 | struct pci_dev *host = NULL; |
880 | struct sis_chipset *chipset = NULL; | 880 | struct sis_chipset *chipset = NULL; |
881 | struct sis_chipset *sets; | ||
881 | 882 | ||
882 | static struct sis_chipset sis_chipsets[] = { | 883 | static struct sis_chipset sis_chipsets[] = { |
883 | 884 | ||
@@ -932,10 +933,11 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
932 | 933 | ||
933 | /* We have to find the bridge first */ | 934 | /* We have to find the bridge first */ |
934 | 935 | ||
935 | for (chipset = &sis_chipsets[0]; chipset->device; chipset++) { | 936 | for (sets = &sis_chipsets[0]; sets->device; sets++) { |
936 | host = pci_get_device(PCI_VENDOR_ID_SI, chipset->device, NULL); | 937 | host = pci_get_device(PCI_VENDOR_ID_SI, sets->device, NULL); |
937 | if (host != NULL) { | 938 | if (host != NULL) { |
938 | if (chipset->device == 0x630) { /* SIS630 */ | 939 | chipset = sets; /* Match found */ |
940 | if (sets->device == 0x630) { /* SIS630 */ | ||
939 | u8 host_rev; | 941 | u8 host_rev; |
940 | pci_read_config_byte(host, PCI_REVISION_ID, &host_rev); | 942 | pci_read_config_byte(host, PCI_REVISION_ID, &host_rev); |
941 | if (host_rev >= 0x30) /* 630 ET */ | 943 | if (host_rev >= 0x30) /* 630 ET */ |
@@ -946,7 +948,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
946 | } | 948 | } |
947 | 949 | ||
948 | /* Look for concealed bridges */ | 950 | /* Look for concealed bridges */ |
949 | if (host == NULL) { | 951 | if (chipset == NULL) { |
950 | /* Second check */ | 952 | /* Second check */ |
951 | u32 idemisc; | 953 | u32 idemisc; |
952 | u16 trueid; | 954 | u16 trueid; |