Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105025
b: refs/heads/master
c: 18de101
h: refs/heads/master
i:
  105023: 810b4c9
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 23, 2008
1 parent 579ae19 commit 5b4712e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 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: af1cbba37343c827e116638b097b94f5e6c38963
refs/heads/master: 18de10170df31d34b342612f1c896a16a52f0a5c
10 changes: 6 additions & 4 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
#include <asm/uaccess.h>
#include <asm/io.h>

static ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */

/**
* generic_id - add a generic drive id
* @drive: drive to make an ID block for
Expand Down Expand Up @@ -1583,15 +1581,18 @@ struct ide_host *ide_host_alloc_all(const struct ide_port_info *d,
if (hws[i] == NULL)
continue;

hwif = kzalloc(sizeof(*hwif), GFP_KERNEL);
if (hwif == NULL)
continue;

idx = ide_find_port_slot(d);
if (idx < 0) {
printk(KERN_ERR "%s: no free slot for interface\n",
d ? d->name : "ide");
kfree(hwif);
continue;
}

hwif = &ide_hwifs[idx];

ide_init_port_data(hwif, idx);

host->ports[i] = hwif;
Expand Down Expand Up @@ -1755,6 +1756,7 @@ void ide_host_remove(struct ide_host *host)

ide_unregister(hwif);
ide_free_port_slot(hwif->index);
kfree(hwif);
}

kfree(host);
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,6 @@ void ide_unregister(ide_hwif_t *hwif)
if (hwif->dma_base)
ide_release_dma_engine(hwif);

spin_lock_irq(&ide_lock);
/* restore hwif data to pristine status */
ide_init_port_data(hwif, hwif->index);
spin_unlock_irq(&ide_lock);

mutex_unlock(&ide_cfg_mtx);
}

Expand Down

0 comments on commit 5b4712e

Please sign in to comment.