if (gadget_is_net2280(fsg->gadget)) mod_data.release = 0x0301; else if (gadget_is_dummy(fsg->gadget)) mod_data.release = 0x0302; else if (gadget_is_pxa(fsg->gadget)) mod_data.release = 0x0303; else if (gadget_is_sh(fsg->gadget)) mod_data.release = 0x0304;  
static int __init check_parameters(struct fsg_dev *fsg){	int	prot;	/* Store the default values */	mod_data.transport_type = USB_PR_BULK;	mod_data.transport_name = "Bulk-only";	mod_data.protocol_type = USB_SC_SCSI;	mod_data.protocol_name = "Transparent SCSI";	if (gadget_is_sh(fsg->gadget))		mod_data.can_stall = 0;	if (mod_data.release == 0xffff) {	// Parameter wasn't set		if (gadget_is_net2280(fsg->gadget))			mod_data.release = 0x0301;		else if (gadget_is_dummy(fsg->gadget))			mod_data.release = 0x0302;		else if (gadget_is_pxa(fsg->gadget))			mod_data.release = 0x0303;		else if (gadget_is_sh(fsg->gadget))			mod_data.release = 0x0304;		/* The sa1100 controller is not supported */		else if (gadget_is_goku(fsg->gadget))			mod_data.release = 0x0306;		else if (gadget_is_mq11xx(fsg->gadget))			mod_data.release = 0x0307;		else if (gadget_is_omap(fsg->gadget))			mod_data.release = 0x0308;		else if (gadget_is_lh7a40x(fsg->gadget))			mod_data.release = 0x0309;		else if (gadget_is_n9604(fsg->gadget))			mod_data.release = 0x0310;		else if (gadget_is_pxa27x(fsg->gadget))			mod_data.release = 0x0311;		else if (gadget_is_s3c2410(gadget))			mod_data.release = 0x0312;		else if (gadget_is_at91(fsg->gadget))			mod_data.release = 0x0313;		else {			WARN(fsg, "controller '%s' not recognized\n",				fsg->gadget->name);			mod_data.release = 0x0399;		}	}	prot = simple_strtol(mod_data.protocol_parm, NULL, 0);#ifdef CONFIG_USB_FILE_STORAGE_TEST	if (strnicmp(mod_data.transport_parm, "BBB", 10) == 0) {		;		// Use default setting	} else if (strnicmp(mod_data.transport_parm, "CB", 10) == 0) {		mod_data.transport_type = USB_PR_CB;		mod_data.transport_name = "Control-Bulk";	} else if (strnicmp(mod_data.transport_parm, "CBI", 10) == 0) {		mod_data.transport_type = USB_PR_CBI;		mod_data.transport_name = "Control-Bulk-Interrupt";	} else {		ERROR(fsg, "invalid transport: %s\n", mod_data.transport_parm);		return -EINVAL;	}	if (strnicmp(mod_data.protocol_parm, "SCSI", 10) == 0 ||			prot == USB_SC_SCSI) {		;		// Use default setting	} else if (strnicmp(mod_data.protocol_parm, "RBC", 10) == 0 ||			prot == USB_SC_RBC) {		mod_data.protocol_type = USB_SC_RBC;		mod_data.protocol_name = "RBC";	} else if (strnicmp(mod_data.protocol_parm, "8020", 4) == 0 ||			strnicmp(mod_data.protocol_parm, "ATAPI", 10) == 0 ||			prot == USB_SC_8020) {		mod_data.protocol_type = USB_SC_8020;		mod_data.protocol_name = "8020i (ATAPI)";	} else if (strnicmp(mod_data.protocol_parm, "QIC", 3) == 0 ||			prot == USB_SC_QIC) {		mod_data.protocol_type = USB_SC_QIC;		mod_data.protocol_name = "QIC-157";	} else if (strnicmp(mod_data.protocol_parm, "UFI", 10) == 0 ||			prot == USB_SC_UFI) {		mod_data.protocol_type = USB_SC_UFI;		mod_data.protocol_name = "UFI";	} else if (strnicmp(mod_data.protocol_parm, "8070", 4) == 0 ||			prot == USB_SC_8070) {		mod_data.protocol_type = USB_SC_8070;		mod_data.protocol_name = "8070i";	} else {		ERROR(fsg, "invalid protocol: %s\n", mod_data.protocol_parm);		return -EINVAL;	}	mod_data.buflen &= PAGE_CACHE_MASK;	if (mod_data.buflen <= 0) {		ERROR(fsg, "invalid buflen\n");		return -ETOOSMALL;	}#endif /* CONFIG_USB_FILE_STORAGE_TEST */	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/91e79c91fab10f5790159d8d0c1d16da2a9653f9/file_storage.c/buggy/drivers/usb/gadget/file_storage.c