memset(db9, 0, sizeof(struct db9)); 
static struct db9 __init *db9_probe(int *config, int nargs){	struct db9 *db9;	struct parport *pp;	int i, j;	if (config[0] < 0)		return NULL;	if (nargs < 2) {		printk(KERN_ERR "db9.c: Device type must be specified.\n");		return NULL;	}	if (config[1] < 1 || config[1] >= DB9_MAX_PAD || !db9_buttons[config[1]]) {		printk(KERN_ERR "db9.c: bad config\n");		return NULL;	}	pp = parport_find_number(config[0]);	if (!pp) {		printk(KERN_ERR "db9.c: no such parport\n");		return NULL;	}	if (db9_bidirectional[config[1]]) {		if (!(pp->modes & PARPORT_MODE_TRISTATE)) {			printk(KERN_ERR "db9.c: specified parport is not bidirectional\n");			parport_put_port(pp);			return NULL;		}	}	if (!(db9 = kmalloc(sizeof(struct db9), GFP_KERNEL))) {		parport_put_port(pp);		return NULL;	}	memset(db9, 0, sizeof(struct db9));	db9->mode = config[1];	init_timer(&db9->timer);	db9->timer.data = (long) db9;	db9->timer.function = db9_timer;	db9->pd = parport_register_device(pp, "db9", NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL);	parport_put_port(pp);	if (!db9->pd) {		printk(KERN_ERR "db9.c: parport busy already - lp.o loaded?\n");		kfree(db9);		return NULL;	}	for (i = 0; i < (min(db9_max_pads[db9->mode], DB9_MAX_DEVICES)); i++) {		sprintf(db9->phys[i], "%s/input%d", db9->pd->port->name, i);		db9->dev[i].private = db9;		db9->dev[i].open = db9_open;		db9->dev[i].close = db9_close;		db9->dev[i].name = db9_name[db9->mode];		db9->dev[i].phys = db9->phys[i];		db9->dev[i].id.bustype = BUS_PARPORT;		db9->dev[i].id.vendor = 0x0002;		db9->dev[i].id.product = config[1];		db9->dev[i].id.version = 0x0100;		db9->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);		for (j = 0; j < db9_buttons[db9->mode]; j++)			set_bit(db9_btn[db9->mode][j], db9->dev[i].keybit);		for (j = 0; j < db9_num_axis[db9->mode]; j++) {			set_bit(db9_abs[j], db9->dev[i].absbit);			if (j < 2) {				db9->dev[i].absmin[db9_abs[j]] = -1;				db9->dev[i].absmax[db9_abs[j]] = 1;			} else {				db9->dev[i].absmin[db9_abs[j]] = 1;				db9->dev[i].absmax[db9_abs[j]] = 255;				db9->dev[i].absflat[db9_abs[j]] = 0;			}		}		input_register_device(db9->dev + i);		printk(KERN_INFO "input: %s on %s\n", db9->dev[i].name, db9->pd->port->name);	}	return db9;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8b1a198bf14d59b67e47dc7b133ec5ea443fb40d/db9.c/buggy/drivers/input/joystick/db9.c