Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260079
b: refs/heads/master
c: 9e158e3
h: refs/heads/master
i:
  260077: beeb1f5
  260075: 4045290
  260071: 903f105
  260063: 558bc70
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Jul 18, 2011
1 parent ea438cf commit d09ac07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 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: 19a3833fd4909c2d88683c0798fe039a69723194
refs/heads/master: 9e158e3082f9c41da75efe7dd32f6c1cf55b5e72
18 changes: 10 additions & 8 deletions trunk/drivers/staging/spectra/lld_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -2397,14 +2397,20 @@ static int nand_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
struct mrst_nand_info *pndev = &info;
u32 int_mask;

ret = pci_enable_device(dev);
if (ret) {
printk(KERN_ERR "Spectra: pci_enable_device failed.\n");
return ret;
}

nand_dbg_print(NAND_DBG_WARN, "%s, Line %d, Function: %s\n",
__FILE__, __LINE__, __func__);

FlashReg = ioremap_nocache(GLOB_HWCTL_REG_BASE,
GLOB_HWCTL_REG_SIZE);
if (!FlashReg) {
printk(KERN_ERR "Spectra: ioremap_nocache failed!");
return -ENOMEM;
goto failed_disable;
}
nand_dbg_print(NAND_DBG_WARN,
"Spectra: Remapped reg base address: "
Expand All @@ -2416,7 +2422,7 @@ static int nand_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
if (!FlashMem) {
printk(KERN_ERR "Spectra: ioremap_nocache failed!");
iounmap(FlashReg);
return -ENOMEM;
goto failed_disable;
}
nand_dbg_print(NAND_DBG_WARN,
"Spectra: Remapped flash base address: "
Expand Down Expand Up @@ -2479,11 +2485,6 @@ static int nand_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
iowrite32(0, FlashReg + TWO_ROW_ADDR_CYCLES);
iowrite32(1, FlashReg + ECC_ENABLE);
enable_ecc = 1;
ret = pci_enable_device(dev);
if (ret) {
printk(KERN_ERR "Spectra: pci_enable_device failed.\n");
goto failed_req_csr;
}

pci_set_master(dev);
pndev->dev = dev;
Expand Down Expand Up @@ -2558,9 +2559,10 @@ static int nand_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
failed_remap_csr:
pci_release_regions(dev);
failed_req_csr:
pci_disable_device(dev);
iounmap(FlashMem);
iounmap(FlashReg);
failed_disable:
pci_disable_device(dev);

return ret;
}
Expand Down

0 comments on commit d09ac07

Please sign in to comment.