/* This function adds any additional addresses reported by the system_map firmware to the parisc device.  */
static void __init add_system_map_addresses(struct parisc_device *dev, int num_addrs, int module_instance)
/* This function adds any additional addresses reported by the system_map firmware to the parisc device.  */
static void __init add_system_map_addresses(struct parisc_device *dev, int num_addrs, int module_instance)
{
	int i;
	long status;
	struct pdc_system_map_addr_info addr_result;
	dev->addr = kmalloc(num_addrs * sizeof(unsigned long), GFP_KERNEL);
	if(!dev->addr) {
		printk(KERN_ERR "%s %s(): memory allocation failure\n",
		       __FILE__, __func__);
		return;
	}
	for(i = 1; i <= num_addrs; ++i) {
		status = pdc_system_map_find_addrs(&addr_result, 
						   module_instance, i);
		if(PDC_OK == status) {
			dev->addr[dev->num_addrs] = (unsigned long)addr_result.mod_addr;
			dev->num_addrs++;
		} else {
			printk(KERN_WARNING 
			       "Bad PDC_FIND_ADDRESS status return (%ld) for index %d\n",
			       status, i);
		}
	}
}