Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29526
b: refs/heads/master
c: e6faf08
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jun 20, 2006
1 parent 5057dca commit d0a2a89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 49 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: 638ebcc81f40b160f5e8b161e690e9b1b9503c1e
refs/heads/master: e6faf082cd75d6dcdcf89258ddf40c6855df87a1
50 changes: 2 additions & 48 deletions trunk/drivers/scsi/sata_nv.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ static irqreturn_t nv_interrupt (int irq, void *dev_instance,
struct pt_regs *regs);
static u32 nv_scr_read (struct ata_port *ap, unsigned int sc_reg);
static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
static void nv_host_stop (struct ata_host_set *host_set);

enum nv_host_type
{
Expand Down Expand Up @@ -137,30 +136,6 @@ static const struct pci_device_id nv_pci_tbl[] = {
{ 0, } /* terminate list */
};

struct nv_host_desc
{
enum nv_host_type host_type;
};
static struct nv_host_desc nv_device_tbl[] = {
{
.host_type = GENERIC,
},
{
.host_type = NFORCE2,
},
{
.host_type = NFORCE3,
},
{ .host_type = CK804,
},
};

struct nv_host
{
struct nv_host_desc *host_desc;
unsigned long host_flags;
};

static struct pci_driver nv_pci_driver = {
.name = DRV_NAME,
.id_table = nv_pci_tbl,
Expand Down Expand Up @@ -208,7 +183,7 @@ static const struct ata_port_operations nv_ops = {
.scr_write = nv_scr_write,
.port_start = ata_port_start,
.port_stop = ata_port_stop,
.host_stop = nv_host_stop,
.host_stop = ata_pci_host_stop,
};

/* FIXME: The hardware provides the necessary SATA PHY controls
Expand Down Expand Up @@ -287,19 +262,9 @@ static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
iowrite32(val, (void __iomem *)ap->ioaddr.scr_addr + (sc_reg * 4));
}

static void nv_host_stop (struct ata_host_set *host_set)
{
struct nv_host *host = host_set->private_data;

kfree(host);

ata_pci_host_stop(host_set);
}

static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int printed_version = 0;
struct nv_host *host;
struct ata_port_info *ppi;
struct ata_probe_ent *probe_ent;
int pci_dev_busy = 0;
Expand Down Expand Up @@ -341,19 +306,10 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if (!probe_ent)
goto err_out_regions;

host = kmalloc(sizeof(struct nv_host), GFP_KERNEL);
if (!host)
goto err_out_free_ent;

memset(host, 0, sizeof(struct nv_host));
host->host_desc = &nv_device_tbl[ent->driver_data];

probe_ent->private_data = host;

probe_ent->mmio_base = pci_iomap(pdev, 5, 0);
if (!probe_ent->mmio_base) {
rc = -EIO;
goto err_out_free_host;
goto err_out_free_ent;
}

base = (unsigned long)probe_ent->mmio_base;
Expand All @@ -373,8 +329,6 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)

err_out_iounmap:
pci_iounmap(pdev, probe_ent->mmio_base);
err_out_free_host:
kfree(host);
err_out_free_ent:
kfree(probe_ent);
err_out_regions:
Expand Down

0 comments on commit d0a2a89

Please sign in to comment.