struct it821x_dev *idev = kmalloc(sizeof(struct it821x_dev), GFP_KERNEL); 
struct it821x_dev *idev = kzalloc(sizeof(struct it821x_dev), GFP_KERNEL); 
static void __devinit init_hwif_it821x(ide_hwif_t *hwif){	struct it821x_dev *idev = kmalloc(sizeof(struct it821x_dev), GFP_KERNEL);	u8 conf;	if(idev == NULL) {		printk(KERN_ERR "it821x: out of memory, falling back to legacy behaviour.\n");		goto fallback;	}	memset(idev, 0, sizeof(struct it821x_dev));	ide_set_hwifdata(hwif, idev);	pci_read_config_byte(hwif->pci_dev, 0x50, &conf);	if(conf & 1) {		idev->smart = 1;		hwif->atapi_dma = 0;		/* Long I/O's although allowed in LBA48 space cause the		   onboard firmware to enter the twighlight zone */		hwif->rqsize = 256;	}	/* Pull the current clocks from 0x50 also */	if (conf & (1 << (1 + hwif->channel)))		idev->clock_mode = ATA_50;	else		idev->clock_mode = ATA_66;	idev->want[0][1] = ATA_ANY;	idev->want[1][1] = ATA_ANY;	/*	 *	Not in the docs but according to the reference driver	 *	this is neccessary.	 */	pci_read_config_byte(hwif->pci_dev, 0x08, &conf);	if(conf == 0x10) {		idev->timing10 = 1;		hwif->atapi_dma = 0;		if(!idev->smart)			printk(KERN_WARNING "it821x: Revision 0x10, workarounds activated.\n");	}	hwif->speedproc = &it821x_tune_chipset;	hwif->tuneproc	= &it821x_tuneproc;	/* MWDMA/PIO clock switching for pass through mode */	if(!idev->smart) {		hwif->dma_start = &it821x_dma_start;		hwif->ide_dma_end = &it821x_dma_end;	}	hwif->drives[0].autotune = 1;	hwif->drives[1].autotune = 1;	if (!hwif->dma_base)		goto fallback;	hwif->ultra_mask = 0x7f;	hwif->mwdma_mask = 0x07;	hwif->swdma_mask = 0x07;	hwif->ide_dma_check = &it821x_config_drive_for_dma;	if (!(hwif->udma_four))		hwif->udma_four = ata66_it821x(hwif);	/*	 *	The BIOS often doesn't set up DMA on this controller	 *	so we always do it.	 */	hwif->autodma = 1;	hwif->drives[0].autodma = hwif->autodma;	hwif->drives[1].autodma = hwif->autodma;	return;fallback:	hwif->autodma = 0;	return;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f5e3c2faa20615e900ab26bd957f898400435924/it821x.c/clean/drivers/ide/pci/it821x.c