Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172845
b: refs/heads/master
c: 7095e3e
h: refs/heads/master
i:
  172843: 5cbb52b
v: v3
  • Loading branch information
Jiri Slaby authored and Jeff Garzik committed Dec 3, 2009
1 parent 6d40048 commit 34d91d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba3a221ce2ec0b636a15e12c23c97af68b9b1114
refs/heads/master: 7095e3eb49869051594b33f6110edd65aff6be50
10 changes: 4 additions & 6 deletions trunk/drivers/ata/pata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
.port_ops = &via_port_ops
};
const struct ata_port_info *ppi[] = { NULL, NULL };
struct pci_dev *isa = NULL;
struct pci_dev *isa;
const struct via_isa_bridge *config;
static int printed_version;
u8 enable;
Expand All @@ -551,15 +551,13 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
if ((isa = pci_get_device(PCI_VENDOR_ID_VIA +
!!(config->flags & VIA_BAD_ID),
config->id, NULL))) {
u8 rev = isa->revision;
pci_dev_put(isa);

if (isa->revision >= config->rev_min &&
isa->revision <= config->rev_max)
if (rev >= config->rev_min && rev <= config->rev_max)
break;
pci_dev_put(isa);
}

pci_dev_put(isa);

if (!(config->flags & VIA_NO_ENABLES)) {
/* 0x40 low bits indicate enabled channels */
pci_read_config_byte(pdev, 0x40 , &enable);
Expand Down

0 comments on commit 34d91d5

Please sign in to comment.