dev_id = pnpbios_kmalloc(sizeof(struct pnp_id), GFP_KERNEL); 
dev_id = kcalloc(1, sizeof(struct pnp_id), GFP_KERNEL); 
static int insert_device(struct pnp_dev *dev, struct pnp_bios_node * node){	struct list_head * pos;	struct pnp_dev * pnp_dev;	struct pnp_id *dev_id;	char id[8];	/* check if the device is already added */	dev->number = node->handle;	list_for_each (pos, &pnpbios_protocol.devices){		pnp_dev = list_entry(pos, struct pnp_dev, protocol_list);		if (dev->number == pnp_dev->number)			return -1;	}	/* set the initial values for the PnP device */	dev_id = pnpbios_kmalloc(sizeof(struct pnp_id), GFP_KERNEL);	if (!dev_id)		return -1;	pnpid32_to_pnpid(node->eisa_id,id);	memcpy(dev_id->id,id,7);	pnp_add_id(dev_id, dev);	pnpbios_parse_data_stream(dev, node);	dev->active = pnp_is_active(dev);	dev->flags = node->flags;	if (!(dev->flags & PNPBIOS_NO_CONFIG))		dev->capabilities |= PNP_CONFIGURABLE;	if (!(dev->flags & PNPBIOS_NO_DISABLE))		dev->capabilities |= PNP_DISABLE;	dev->capabilities |= PNP_READ;	if (pnpbios_is_dynamic(dev))		dev->capabilities |= PNP_WRITE;	if (dev->flags & PNPBIOS_REMOVABLE)		dev->capabilities |= PNP_REMOVABLE;	dev->protocol = &pnpbios_protocol;	/* clear out the damaged flags */	if (!dev->active)		pnp_init_resource_table(&dev->res);	pnp_add_device(dev);	pnpbios_interface_attach_device(node);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a2822e7f00cdccbff8e507b5ebbddce1aa95eb5d/core.c/clean/drivers/pnp/pnpbios/core.c