zero.c (b3e5ced63e051e8f911b795ac5b06229a5328f7b) | zero.c (c94e289f195e0e13cf34d27f9338d28221a85751) |
---|---|
1/* 2 * zero.c -- Gadget Zero, for USB development 3 * 4 * Copyright (C) 2003-2008 David Brownell 5 * Copyright (C) 2008 by Nokia Corporation 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 258 unchanged lines hidden (view full) --- 267MODULE_PARM_DESC(isoc_maxburst, "0 - 15 (ss only)"); 268 269static struct usb_function *func_lb; 270static struct usb_function_instance *func_inst_lb; 271 272module_param_named(qlen, gzero_options.qlen, uint, S_IRUGO|S_IWUSR); 273MODULE_PARM_DESC(qlen, "depth of loopback queue"); 274 | 1/* 2 * zero.c -- Gadget Zero, for USB development 3 * 4 * Copyright (C) 2003-2008 David Brownell 5 * Copyright (C) 2008 by Nokia Corporation 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 258 unchanged lines hidden (view full) --- 267MODULE_PARM_DESC(isoc_maxburst, "0 - 15 (ss only)"); 268 269static struct usb_function *func_lb; 270static struct usb_function_instance *func_inst_lb; 271 272module_param_named(qlen, gzero_options.qlen, uint, S_IRUGO|S_IWUSR); 273MODULE_PARM_DESC(qlen, "depth of loopback queue"); 274 |
275static int __init zero_bind(struct usb_composite_dev *cdev) | 275static int zero_bind(struct usb_composite_dev *cdev) |
276{ 277 struct f_ss_opts *ss_opts; 278 struct f_lb_opts *lb_opts; 279 int status; 280 281 /* Allocate string descriptor numbers ... note that string 282 * contents can be overridden by the composite_dev glue. 283 */ --- 111 unchanged lines hidden (view full) --- 395 usb_put_function(func_ss); 396 usb_put_function_instance(func_inst_ss); 397 if (!IS_ERR_OR_NULL(func_lb)) 398 usb_put_function(func_lb); 399 usb_put_function_instance(func_inst_lb); 400 return 0; 401} 402 | 276{ 277 struct f_ss_opts *ss_opts; 278 struct f_lb_opts *lb_opts; 279 int status; 280 281 /* Allocate string descriptor numbers ... note that string 282 * contents can be overridden by the composite_dev glue. 283 */ --- 111 unchanged lines hidden (view full) --- 395 usb_put_function(func_ss); 396 usb_put_function_instance(func_inst_ss); 397 if (!IS_ERR_OR_NULL(func_lb)) 398 usb_put_function(func_lb); 399 usb_put_function_instance(func_inst_lb); 400 return 0; 401} 402 |
403static __refdata struct usb_composite_driver zero_driver = { | 403static struct usb_composite_driver zero_driver = { |
404 .name = "zero", 405 .dev = &device_desc, 406 .strings = dev_strings, 407 .max_speed = USB_SPEED_SUPER, 408 .bind = zero_bind, 409 .unbind = zero_unbind, 410 .suspend = zero_suspend, 411 .resume = zero_resume, 412}; 413 414module_usb_composite_driver(zero_driver); 415 416MODULE_AUTHOR("David Brownell"); 417MODULE_LICENSE("GPL"); | 404 .name = "zero", 405 .dev = &device_desc, 406 .strings = dev_strings, 407 .max_speed = USB_SPEED_SUPER, 408 .bind = zero_bind, 409 .unbind = zero_unbind, 410 .suspend = zero_suspend, 411 .resume = zero_resume, 412}; 413 414module_usb_composite_driver(zero_driver); 415 416MODULE_AUTHOR("David Brownell"); 417MODULE_LICENSE("GPL"); |