class_simple_device_add(tipar_class, MKDEV(TIPAR_MAJOR, 
class_device_create(tipar_class, MKDEV(TIPAR_MAJOR, 
tipar_register(int nr, struct parport *port){	int err = 0;	/* Register our module into parport */	table[nr].dev = parport_register_device(port, "tipar",						NULL, NULL, NULL, 0,						(void *) &table[nr]);	if (table[nr].dev == NULL) {		err = 1;		goto out;	}	class_simple_device_add(tipar_class, MKDEV(TIPAR_MAJOR,			TIPAR_MINOR + nr), NULL, "par%d", nr);	/* Use devfs, tree: /dev/ticables/par/[0..2] */	err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr),			S_IFCHR | S_IRUGO | S_IWUGO,			"ticables/par/%d", nr);	if (err)		goto out_class;	/* Display informations */	pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==		PARPORT_IRQ_NONE) ? "polling" : "interrupt-driven");	if (probe_ti_parallel(nr) != -1)		pr_info("tipar%d: link cable found\n", nr);	else		pr_info("tipar%d: link cable not found\n", nr);	err = 0;	goto out;out_class:	class_simple_device_remove(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr));	class_simple_destroy(tipar_class);out:	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ca8eca6884861c1ce294b05aacfdf9045bba9aff/tipar.c/buggy/drivers/char/tipar.c