diff options
author | Deepak Saxena <dsaxena@plexity.net> | 2005-11-07 04:01:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:00 -0500 |
commit | f5e3c2faa20615e900ab26bd957f898400435924 (patch) | |
tree | d3dd4c93539f155e3fd4ef18ae9cfe482ed1b340 /drivers/ide/pci | |
parent | 9c2153844d72ac92b6da0ee42f7f81fb0aa91f8a (diff) |
[PATCH] ide: kmalloc + memset -> kzalloc conversion
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/hpt366.c | 3 | ||||
-rw-r--r-- | drivers/ide/pci/it821x.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 127619a109ed..7b589d948bf9 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1516,7 +1516,7 @@ static void __devinit init_dma_hpt366(ide_hwif_t *hwif, unsigned long dmabase) | |||
1516 | 1516 | ||
1517 | static void __devinit init_iops_hpt366(ide_hwif_t *hwif) | 1517 | static void __devinit init_iops_hpt366(ide_hwif_t *hwif) |
1518 | { | 1518 | { |
1519 | struct hpt_info *info = kmalloc(sizeof(struct hpt_info), GFP_KERNEL); | 1519 | struct hpt_info *info = kzalloc(sizeof(struct hpt_info), GFP_KERNEL); |
1520 | unsigned long dmabase = pci_resource_start(hwif->pci_dev, 4); | 1520 | unsigned long dmabase = pci_resource_start(hwif->pci_dev, 4); |
1521 | u8 did, rid; | 1521 | u8 did, rid; |
1522 | 1522 | ||
@@ -1524,7 +1524,6 @@ static void __devinit init_iops_hpt366(ide_hwif_t *hwif) | |||
1524 | printk(KERN_WARNING "hpt366: out of memory.\n"); | 1524 | printk(KERN_WARNING "hpt366: out of memory.\n"); |
1525 | return; | 1525 | return; |
1526 | } | 1526 | } |
1527 | memset(info, 0, sizeof(struct hpt_info)); | ||
1528 | ide_set_hwifdata(hwif, info); | 1527 | ide_set_hwifdata(hwif, info); |
1529 | 1528 | ||
1530 | if(dmabase) { | 1529 | if(dmabase) { |
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index e440036e651f..108fda83fea4 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c | |||
@@ -642,14 +642,13 @@ static void __devinit it821x_fixups(ide_hwif_t *hwif) | |||
642 | 642 | ||
643 | static void __devinit init_hwif_it821x(ide_hwif_t *hwif) | 643 | static void __devinit init_hwif_it821x(ide_hwif_t *hwif) |
644 | { | 644 | { |
645 | struct it821x_dev *idev = kmalloc(sizeof(struct it821x_dev), GFP_KERNEL); | 645 | struct it821x_dev *idev = kzalloc(sizeof(struct it821x_dev), GFP_KERNEL); |
646 | u8 conf; | 646 | u8 conf; |
647 | 647 | ||
648 | if(idev == NULL) { | 648 | if(idev == NULL) { |
649 | printk(KERN_ERR "it821x: out of memory, falling back to legacy behaviour.\n"); | 649 | printk(KERN_ERR "it821x: out of memory, falling back to legacy behaviour.\n"); |
650 | goto fallback; | 650 | goto fallback; |
651 | } | 651 | } |
652 | memset(idev, 0, sizeof(struct it821x_dev)); | ||
653 | ide_set_hwifdata(hwif, idev); | 652 | ide_set_hwifdata(hwif, idev); |
654 | 653 | ||
655 | pci_read_config_byte(hwif->pci_dev, 0x50, &conf); | 654 | pci_read_config_byte(hwif->pci_dev, 0x50, &conf); |