for (i = 0; i < 2; i++) if (tmdc->exists & (1 << i)) input_unregister_device(tmdc->dev + i); 
for (i = 0; i < 2; i++) { if (tmdc->port[i]) { input_unregister_device(tmdc->port[i]->dev); kfree(tmdc->port[i]); } } 
static void tmdc_disconnect(struct gameport *gameport){	struct tmdc *tmdc = gameport_get_drvdata(gameport);	int i;	for (i = 0; i < 2; i++)		if (tmdc->exists & (1 << i))			input_unregister_device(tmdc->dev + i);	gameport_close(gameport);	gameport_set_drvdata(gameport, NULL);	kfree(tmdc);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/17dd3f0f7aa729a042af5d3318ff9b3e7781b45b/tmdc.c/buggy/drivers/input/joystick/tmdc.c