dma = pnpacpi_kmalloc(sizeof(struct pnp_dma), GFP_KERNEL); 
dma = kcalloc(1, sizeof(struct pnp_dma), GFP_KERNEL); 
static void pnpacpi_parse_dma_option(struct pnp_option *option, struct acpi_resource_dma *p){	int i;	struct pnp_dma * dma;	if (p->number_of_channels == 0)		return;	dma = pnpacpi_kmalloc(sizeof(struct pnp_dma), GFP_KERNEL);	if (!dma)		return;	for(i = 0; i < p->number_of_channels; i++)		dma->map |= 1 << p->channels[i];	dma->flags = 0;	if (p->bus_master)		dma->flags |= IORESOURCE_DMA_MASTER;	switch (p->type) {	case ACPI_COMPATIBILITY:		dma->flags |= IORESOURCE_DMA_COMPATIBLE;		break;	case ACPI_TYPE_A:		dma->flags |= IORESOURCE_DMA_TYPEA;		break;	case ACPI_TYPE_B:		dma->flags |= IORESOURCE_DMA_TYPEB;		break;	case ACPI_TYPE_F:		dma->flags |= IORESOURCE_DMA_TYPEF;		break;	default:		/* Set a default value ? */		dma->flags |= IORESOURCE_DMA_COMPATIBLE;		pnp_err("Invalid DMA type");	}	switch (p->transfer) {	case ACPI_TRANSFER_8:		dma->flags |= IORESOURCE_DMA_8BIT;		break;	case ACPI_TRANSFER_8_16:		dma->flags |= IORESOURCE_DMA_8AND16BIT;		break;	case ACPI_TRANSFER_16:		dma->flags |= IORESOURCE_DMA_16BIT;		break;	default:		/* Set a default value ? */		dma->flags |= IORESOURCE_DMA_8AND16BIT;		pnp_err("Invalid DMA transfer type");	}	pnp_register_dma_resource(option,dma);	return;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a2822e7f00cdccbff8e507b5ebbddce1aa95eb5d/rsparser.c/clean/drivers/pnp/pnpacpi/rsparser.c