From dc37b63acac6aff558ff4d2769637a77347f0e46 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Tue, 6 Jan 2009 17:20:56 +0100 Subject: [PATCH] --- yaml --- r: 126443 b: refs/heads/master c: a32296f93821497d794ab8e1312d677717479777 h: refs/heads/master i: 126441: f6f52d7b9212766267679dbbdd8255cde9406f07 126439: ec8eb0321d5a82f3cbfc814faeb52025fe2979f8 v: v3 --- [refs] | 2 +- trunk/drivers/ide/ide-probe.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 7a04cb12c4a7..b48ad886a5e7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 07af5a5b0241422e4ca2dd114eaa1d7ad0165cb5 +refs/heads/master: a32296f93821497d794ab8e1312d677717479777 diff --git a/trunk/drivers/ide/ide-probe.c b/trunk/drivers/ide/ide-probe.c index 2fca32ed576f..00c7e5a67bd1 100644 --- a/trunk/drivers/ide/ide-probe.c +++ b/trunk/drivers/ide/ide-probe.c @@ -1391,9 +1391,11 @@ static void ide_free_port_slot(int idx) struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws) { struct ide_host *host; + struct device *dev = hws[0] ? hws[0]->dev : NULL; + int node = dev ? dev_to_node(dev) : -1; int i; - host = kzalloc(sizeof(*host), GFP_KERNEL); + host = kzalloc_node(sizeof(*host), GFP_KERNEL, node); if (host == NULL) return NULL; @@ -1404,7 +1406,7 @@ struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws) if (hws[i] == NULL) continue; - hwif = kzalloc(sizeof(*hwif), GFP_KERNEL); + hwif = kzalloc_node(sizeof(*hwif), GFP_KERNEL, node); if (hwif == NULL) continue; @@ -1429,8 +1431,7 @@ struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws) return NULL; } - if (hws[0]) - host->dev[0] = hws[0]->dev; + host->dev[0] = dev; if (d) { host->init_chipset = d->init_chipset;