ret = platform_device_register(&i82365_device); 
i82365_device = platform_device_alloc("i82365", 0); if (i82365_device) { ret = platform_device_add(i82365_device); if (ret) platform_device_put(i82365_device); } else ret = -ENOMEM;  
static int __init init_i82365(void){    int i, ret;    ret = driver_register(&i82365_driver);    if (ret)	return ret;    ret = platform_device_register(&i82365_device);    if (ret) {	driver_unregister(&i82365_driver);	return ret;    }    printk(KERN_INFO "Intel ISA PCIC probe: ");    sockets = 0;    isa_probe();    if (sockets == 0) {	printk("not found.\n");	platform_device_unregister(&i82365_device);	release_region(i365_base, 2);	driver_unregister(&i82365_driver);	return -ENODEV;    }    /* Set up interrupt handler(s) */    if (grab_irq != 0)	request_irq(cs_irq, pcic_interrupt, 0, "i82365", pcic_interrupt);        /* register sockets with the pcmcia core */    for (i = 0; i < sockets; i++) {	    socket[i].socket.dev.dev = &i82365_device.dev;	    socket[i].socket.ops = &pcic_operations;	    socket[i].socket.resource_ops = &pccard_nonstatic_ops;	    socket[i].socket.owner = THIS_MODULE;	    socket[i].number = i;	    ret = pcmcia_register_socket(&socket[i].socket);	    if (!ret)		    socket[i].flags |= IS_REGISTERED;#if 0 /* driver model ordering issue */	   class_device_create_file(&socket[i].socket.dev,			   	    &class_device_attr_info);	   class_device_create_file(&socket[i].socket.dev,			   	    &class_device_attr_exca);#endif    }    /* Finally, schedule a polling interrupt */    if (poll_interval != 0) {	poll_timer.function = pcic_interrupt_wrapper;	poll_timer.data = 0;	init_timer(&poll_timer);    	poll_timer.expires = jiffies + poll_interval;	add_timer(&poll_timer);    }        return 0;    } /* init_i82365 */
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/dfb279c97510da659816f4f055146bb1f9f0a870/i82365.c/clean/drivers/pcmcia/i82365.c