aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:35 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:35 -0500
commit422278ef9585b0be62b1bd6d48935a7529aa5094 (patch)
tree902286515bc19543926a07ba11a15c015c40f1d9
parenta6fbb1c8c312be902f1085824c98ca50c86d5893 (diff)
ide: remove needless zeroing of hwgroup fields from init_irq()
Since kmalloc_node() is called with __GFP_ZERO flag there is no need to explicitly zero hwgroup fields. While at it: * Use 'hwif' instead of 'hwif->drives[0].hwif' for kmalloc_node() call. * Fix whitespace damage. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-probe.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 00b2b07f63be..84810aa57a67 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -998,19 +998,14 @@ static int init_irq (ide_hwif_t *hwif)
998 hwgroup->hwif->next = hwif; 998 hwgroup->hwif->next = hwif;
999 spin_unlock_irq(&ide_lock); 999 spin_unlock_irq(&ide_lock);
1000 } else { 1000 } else {
1001 hwgroup = kmalloc_node(sizeof(ide_hwgroup_t), 1001 hwgroup = kmalloc_node(sizeof(*hwgroup), GFP_KERNEL|__GFP_ZERO,
1002 GFP_KERNEL | __GFP_ZERO, 1002 hwif_to_node(hwif));
1003 hwif_to_node(hwif->drives[0].hwif)); 1003 if (hwgroup == NULL)
1004 if (!hwgroup) 1004 goto out_up;
1005 goto out_up;
1006 1005
1007 hwif->hwgroup = hwgroup; 1006 hwif->hwgroup = hwgroup;
1007 hwgroup->hwif = hwif->next = hwif;
1008 1008
1009 hwgroup->hwif = hwif->next = hwif;
1010 hwgroup->rq = NULL;
1011 hwgroup->handler = NULL;
1012 hwgroup->drive = NULL;
1013 hwgroup->busy = 0;
1014 init_timer(&hwgroup->timer); 1009 init_timer(&hwgroup->timer);
1015 hwgroup->timer.function = &ide_timer_expiry; 1010 hwgroup->timer.function = &ide_timer_expiry;
1016 hwgroup->timer.data = (unsigned long) hwgroup; 1011 hwgroup->timer.data = (unsigned long) hwgroup;