2008-06-20 01:18:50 +00:00
|
|
|
/*
|
|
|
|
* f_serial.c - generic USB serial function driver
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 Al Borchers (alborchers@steinerpoint.com)
|
|
|
|
* Copyright (C) 2008 by David Brownell
|
|
|
|
* Copyright (C) 2008 by Nokia Corporation
|
|
|
|
*
|
|
|
|
* This software is distributed under the terms of the GNU General
|
|
|
|
* Public License ("GPL") as published by the Free Software Foundation,
|
|
|
|
* either version 2 of that License or (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 08:04:11 +00:00
|
|
|
#include <linux/slab.h>
|
2008-06-20 01:18:50 +00:00
|
|
|
#include <linux/kernel.h>
|
2013-03-18 08:52:57 +00:00
|
|
|
#include <linux/module.h>
|
2008-06-20 01:18:50 +00:00
|
|
|
#include <linux/device.h>
|
|
|
|
|
|
|
|
#include "u_serial.h"
|
|
|
|
#include "gadget_chips.h"
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This function packages a simple "generic serial" port with no real
|
|
|
|
* control mechanisms, just raw data transfer over two bulk endpoints.
|
|
|
|
*
|
|
|
|
* Because it's not standardized, this isn't as interoperable as the
|
|
|
|
* CDC ACM driver. However, for many purposes it's just as functional
|
|
|
|
* if you can arrange appropriate host side drivers.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct f_gser {
|
|
|
|
struct gserial port;
|
|
|
|
u8 data_id;
|
|
|
|
u8 port_num;
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline struct f_gser *func_to_gser(struct usb_function *f)
|
|
|
|
{
|
|
|
|
return container_of(f, struct f_gser, port.func);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
/* interface descriptor: */
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_interface_descriptor gser_interface_desc = {
|
2008-06-20 01:18:50 +00:00
|
|
|
.bLength = USB_DT_INTERFACE_SIZE,
|
|
|
|
.bDescriptorType = USB_DT_INTERFACE,
|
|
|
|
/* .bInterfaceNumber = DYNAMIC */
|
|
|
|
.bNumEndpoints = 2,
|
|
|
|
.bInterfaceClass = USB_CLASS_VENDOR_SPEC,
|
|
|
|
.bInterfaceSubClass = 0,
|
|
|
|
.bInterfaceProtocol = 0,
|
|
|
|
/* .iInterface = DYNAMIC */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* full speed support: */
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_endpoint_descriptor gser_fs_in_desc = {
|
2008-06-20 01:18:50 +00:00
|
|
|
.bLength = USB_DT_ENDPOINT_SIZE,
|
|
|
|
.bDescriptorType = USB_DT_ENDPOINT,
|
|
|
|
.bEndpointAddress = USB_DIR_IN,
|
|
|
|
.bmAttributes = USB_ENDPOINT_XFER_BULK,
|
|
|
|
};
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_endpoint_descriptor gser_fs_out_desc = {
|
2008-06-20 01:18:50 +00:00
|
|
|
.bLength = USB_DT_ENDPOINT_SIZE,
|
|
|
|
.bDescriptorType = USB_DT_ENDPOINT,
|
|
|
|
.bEndpointAddress = USB_DIR_OUT,
|
|
|
|
.bmAttributes = USB_ENDPOINT_XFER_BULK,
|
|
|
|
};
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_descriptor_header *gser_fs_function[] = {
|
2008-06-20 01:18:50 +00:00
|
|
|
(struct usb_descriptor_header *) &gser_interface_desc,
|
|
|
|
(struct usb_descriptor_header *) &gser_fs_in_desc,
|
|
|
|
(struct usb_descriptor_header *) &gser_fs_out_desc,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* high speed support: */
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_endpoint_descriptor gser_hs_in_desc = {
|
2008-06-20 01:18:50 +00:00
|
|
|
.bLength = USB_DT_ENDPOINT_SIZE,
|
|
|
|
.bDescriptorType = USB_DT_ENDPOINT,
|
|
|
|
.bmAttributes = USB_ENDPOINT_XFER_BULK,
|
2009-02-11 22:11:36 +00:00
|
|
|
.wMaxPacketSize = cpu_to_le16(512),
|
2008-06-20 01:18:50 +00:00
|
|
|
};
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_endpoint_descriptor gser_hs_out_desc = {
|
2008-06-20 01:18:50 +00:00
|
|
|
.bLength = USB_DT_ENDPOINT_SIZE,
|
|
|
|
.bDescriptorType = USB_DT_ENDPOINT,
|
|
|
|
.bmAttributes = USB_ENDPOINT_XFER_BULK,
|
2009-02-11 22:11:36 +00:00
|
|
|
.wMaxPacketSize = cpu_to_le16(512),
|
2008-06-20 01:18:50 +00:00
|
|
|
};
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_descriptor_header *gser_hs_function[] = {
|
2008-06-20 01:18:50 +00:00
|
|
|
(struct usb_descriptor_header *) &gser_interface_desc,
|
|
|
|
(struct usb_descriptor_header *) &gser_hs_in_desc,
|
|
|
|
(struct usb_descriptor_header *) &gser_hs_out_desc,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_endpoint_descriptor gser_ss_in_desc = {
|
2012-02-06 17:46:36 +00:00
|
|
|
.bLength = USB_DT_ENDPOINT_SIZE,
|
|
|
|
.bDescriptorType = USB_DT_ENDPOINT,
|
|
|
|
.bmAttributes = USB_ENDPOINT_XFER_BULK,
|
|
|
|
.wMaxPacketSize = cpu_to_le16(1024),
|
|
|
|
};
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_endpoint_descriptor gser_ss_out_desc = {
|
2012-02-06 17:46:36 +00:00
|
|
|
.bLength = USB_DT_ENDPOINT_SIZE,
|
|
|
|
.bDescriptorType = USB_DT_ENDPOINT,
|
|
|
|
.bmAttributes = USB_ENDPOINT_XFER_BULK,
|
|
|
|
.wMaxPacketSize = cpu_to_le16(1024),
|
|
|
|
};
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_ss_ep_comp_descriptor gser_ss_bulk_comp_desc = {
|
2012-02-06 17:46:36 +00:00
|
|
|
.bLength = sizeof gser_ss_bulk_comp_desc,
|
|
|
|
.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
|
|
|
|
};
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static struct usb_descriptor_header *gser_ss_function[] = {
|
2012-02-06 17:46:36 +00:00
|
|
|
(struct usb_descriptor_header *) &gser_interface_desc,
|
|
|
|
(struct usb_descriptor_header *) &gser_ss_in_desc,
|
|
|
|
(struct usb_descriptor_header *) &gser_ss_bulk_comp_desc,
|
|
|
|
(struct usb_descriptor_header *) &gser_ss_out_desc,
|
|
|
|
(struct usb_descriptor_header *) &gser_ss_bulk_comp_desc,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2008-06-20 01:18:50 +00:00
|
|
|
/* string descriptors: */
|
|
|
|
|
|
|
|
static struct usb_string gser_string_defs[] = {
|
|
|
|
[0].s = "Generic Serial",
|
|
|
|
{ } /* end of list */
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct usb_gadget_strings gser_string_table = {
|
|
|
|
.language = 0x0409, /* en-us */
|
|
|
|
.strings = gser_string_defs,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct usb_gadget_strings *gser_strings[] = {
|
|
|
|
&gser_string_table,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
static int gser_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
|
|
|
|
{
|
|
|
|
struct f_gser *gser = func_to_gser(f);
|
|
|
|
struct usb_composite_dev *cdev = f->config->cdev;
|
|
|
|
|
|
|
|
/* we know alt == 0, so this is an activation or a reset */
|
|
|
|
|
|
|
|
if (gser->port.in->driver_data) {
|
|
|
|
DBG(cdev, "reset generic ttyGS%d\n", gser->port_num);
|
|
|
|
gserial_disconnect(&gser->port);
|
2011-06-28 13:33:50 +00:00
|
|
|
}
|
|
|
|
if (!gser->port.in->desc || !gser->port.out->desc) {
|
2008-06-20 01:18:50 +00:00
|
|
|
DBG(cdev, "activate generic ttyGS%d\n", gser->port_num);
|
2011-11-18 19:16:27 +00:00
|
|
|
if (config_ep_by_speed(cdev->gadget, f, gser->port.in) ||
|
|
|
|
config_ep_by_speed(cdev->gadget, f, gser->port.out)) {
|
2011-06-28 13:33:50 +00:00
|
|
|
gser->port.in->desc = NULL;
|
|
|
|
gser->port.out->desc = NULL;
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
2008-06-20 01:18:50 +00:00
|
|
|
}
|
|
|
|
gserial_connect(&gser->port, gser->port_num);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void gser_disable(struct usb_function *f)
|
|
|
|
{
|
|
|
|
struct f_gser *gser = func_to_gser(f);
|
|
|
|
struct usb_composite_dev *cdev = f->config->cdev;
|
|
|
|
|
|
|
|
DBG(cdev, "generic ttyGS%d deactivated\n", gser->port_num);
|
|
|
|
gserial_disconnect(&gser->port);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
/* serial function driver setup/binding */
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static int gser_bind(struct usb_configuration *c, struct usb_function *f)
|
2008-06-20 01:18:50 +00:00
|
|
|
{
|
|
|
|
struct usb_composite_dev *cdev = c->cdev;
|
|
|
|
struct f_gser *gser = func_to_gser(f);
|
|
|
|
int status;
|
|
|
|
struct usb_ep *ep;
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
/* REVISIT might want instance-specific strings to help
|
|
|
|
* distinguish instances ...
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* maybe allocate device-global string ID */
|
|
|
|
if (gser_string_defs[0].id == 0) {
|
|
|
|
status = usb_string_id(c->cdev);
|
|
|
|
if (status < 0)
|
|
|
|
return status;
|
|
|
|
gser_string_defs[0].id = status;
|
|
|
|
}
|
|
|
|
|
2008-06-20 01:18:50 +00:00
|
|
|
/* allocate instance-specific interface IDs */
|
|
|
|
status = usb_interface_id(c, f);
|
|
|
|
if (status < 0)
|
|
|
|
goto fail;
|
|
|
|
gser->data_id = status;
|
|
|
|
gser_interface_desc.bInterfaceNumber = status;
|
|
|
|
|
|
|
|
status = -ENODEV;
|
|
|
|
|
|
|
|
/* allocate instance-specific endpoints */
|
|
|
|
ep = usb_ep_autoconfig(cdev->gadget, &gser_fs_in_desc);
|
|
|
|
if (!ep)
|
|
|
|
goto fail;
|
|
|
|
gser->port.in = ep;
|
|
|
|
ep->driver_data = cdev; /* claim */
|
|
|
|
|
|
|
|
ep = usb_ep_autoconfig(cdev->gadget, &gser_fs_out_desc);
|
|
|
|
if (!ep)
|
|
|
|
goto fail;
|
|
|
|
gser->port.out = ep;
|
|
|
|
ep->driver_data = cdev; /* claim */
|
|
|
|
|
|
|
|
/* support all relevant hardware speeds... we expect that when
|
|
|
|
* hardware is dual speed, all bulk-capable endpoints work at
|
|
|
|
* both speeds
|
|
|
|
*/
|
2012-10-22 20:15:06 +00:00
|
|
|
gser_hs_in_desc.bEndpointAddress = gser_fs_in_desc.bEndpointAddress;
|
|
|
|
gser_hs_out_desc.bEndpointAddress = gser_fs_out_desc.bEndpointAddress;
|
2008-06-20 01:18:50 +00:00
|
|
|
|
2012-10-22 20:15:06 +00:00
|
|
|
gser_ss_in_desc.bEndpointAddress = gser_fs_in_desc.bEndpointAddress;
|
|
|
|
gser_ss_out_desc.bEndpointAddress = gser_fs_out_desc.bEndpointAddress;
|
|
|
|
|
|
|
|
status = usb_assign_descriptors(f, gser_fs_function, gser_hs_function,
|
|
|
|
gser_ss_function);
|
|
|
|
if (status)
|
|
|
|
goto fail;
|
2008-06-20 01:18:50 +00:00
|
|
|
DBG(cdev, "generic ttyGS%d: %s speed IN/%s OUT/%s\n",
|
|
|
|
gser->port_num,
|
2012-02-06 17:46:36 +00:00
|
|
|
gadget_is_superspeed(c->cdev->gadget) ? "super" :
|
2008-06-20 01:18:50 +00:00
|
|
|
gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full",
|
|
|
|
gser->port.in->name, gser->port.out->name);
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
/* we might as well release our claims on endpoints */
|
|
|
|
if (gser->port.out)
|
|
|
|
gser->port.out->driver_data = NULL;
|
|
|
|
if (gser->port.in)
|
|
|
|
gser->port.in->driver_data = NULL;
|
|
|
|
|
|
|
|
ERROR(cdev, "%s: can't bind, err %d\n", f->name, status);
|
|
|
|
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
2013-03-27 08:12:03 +00:00
|
|
|
static inline struct f_serial_opts *to_f_serial_opts(struct config_item *item)
|
|
|
|
{
|
|
|
|
return container_of(to_config_group(item), struct f_serial_opts,
|
|
|
|
func_inst.group);
|
|
|
|
}
|
|
|
|
|
|
|
|
CONFIGFS_ATTR_STRUCT(f_serial_opts);
|
|
|
|
static ssize_t f_serial_attr_show(struct config_item *item,
|
|
|
|
struct configfs_attribute *attr,
|
|
|
|
char *page)
|
|
|
|
{
|
|
|
|
struct f_serial_opts *opts = to_f_serial_opts(item);
|
|
|
|
struct f_serial_opts_attribute *f_serial_opts_attr =
|
|
|
|
container_of(attr, struct f_serial_opts_attribute, attr);
|
|
|
|
ssize_t ret = 0;
|
|
|
|
|
|
|
|
if (f_serial_opts_attr->show)
|
|
|
|
ret = f_serial_opts_attr->show(opts, page);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void serial_attr_release(struct config_item *item)
|
|
|
|
{
|
|
|
|
struct f_serial_opts *opts = to_f_serial_opts(item);
|
|
|
|
|
|
|
|
usb_put_function_instance(&opts->func_inst);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct configfs_item_operations serial_item_ops = {
|
|
|
|
.release = serial_attr_release,
|
|
|
|
.show_attribute = f_serial_attr_show,
|
|
|
|
};
|
|
|
|
|
|
|
|
static ssize_t f_serial_port_num_show(struct f_serial_opts *opts, char *page)
|
|
|
|
{
|
|
|
|
return sprintf(page, "%u\n", opts->port_num);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct f_serial_opts_attribute f_serial_port_num =
|
|
|
|
__CONFIGFS_ATTR_RO(port_num, f_serial_port_num_show);
|
|
|
|
|
|
|
|
static struct configfs_attribute *acm_attrs[] = {
|
|
|
|
&f_serial_port_num.attr,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct config_item_type serial_func_type = {
|
|
|
|
.ct_item_ops = &serial_item_ops,
|
|
|
|
.ct_attrs = acm_attrs,
|
|
|
|
.ct_owner = THIS_MODULE,
|
|
|
|
};
|
|
|
|
|
2013-03-18 08:52:57 +00:00
|
|
|
static void gser_free_inst(struct usb_function_instance *f)
|
|
|
|
{
|
|
|
|
struct f_serial_opts *opts;
|
|
|
|
|
|
|
|
opts = container_of(f, struct f_serial_opts, func_inst);
|
|
|
|
gserial_free_line(opts->port_num);
|
|
|
|
kfree(opts);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct usb_function_instance *gser_alloc_inst(void)
|
|
|
|
{
|
|
|
|
struct f_serial_opts *opts;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
opts = kzalloc(sizeof(*opts), GFP_KERNEL);
|
|
|
|
if (!opts)
|
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
|
|
|
|
|
opts->func_inst.free_func_inst = gser_free_inst;
|
|
|
|
ret = gserial_alloc_line(&opts->port_num);
|
|
|
|
if (ret) {
|
|
|
|
kfree(opts);
|
|
|
|
return ERR_PTR(ret);
|
|
|
|
}
|
2013-03-27 08:12:03 +00:00
|
|
|
config_group_init_type_name(&opts->func_inst.group, "",
|
|
|
|
&serial_func_type);
|
2013-03-18 08:52:57 +00:00
|
|
|
|
|
|
|
return &opts->func_inst;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void gser_free(struct usb_function *f)
|
|
|
|
{
|
|
|
|
struct f_gser *serial;
|
|
|
|
|
|
|
|
serial = func_to_gser(f);
|
|
|
|
kfree(serial);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void gser_unbind(struct usb_configuration *c, struct usb_function *f)
|
|
|
|
{
|
|
|
|
usb_free_all_descriptors(f);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct usb_function *gser_alloc(struct usb_function_instance *fi)
|
|
|
|
{
|
|
|
|
struct f_gser *gser;
|
|
|
|
struct f_serial_opts *opts;
|
|
|
|
|
|
|
|
/* allocate and initialize one new instance */
|
|
|
|
gser = kzalloc(sizeof(*gser), GFP_KERNEL);
|
|
|
|
if (!gser)
|
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
|
|
|
|
|
opts = container_of(fi, struct f_serial_opts, func_inst);
|
|
|
|
|
|
|
|
gser->port_num = opts->port_num;
|
|
|
|
|
|
|
|
gser->port.func.name = "gser";
|
|
|
|
gser->port.func.strings = gser_strings;
|
|
|
|
gser->port.func.bind = gser_bind;
|
|
|
|
gser->port.func.unbind = gser_unbind;
|
|
|
|
gser->port.func.set_alt = gser_set_alt;
|
|
|
|
gser->port.func.disable = gser_disable;
|
|
|
|
gser->port.func.free_func = gser_free;
|
|
|
|
|
|
|
|
return &gser->port.func;
|
|
|
|
}
|
|
|
|
|
|
|
|
DECLARE_USB_FUNCTION_INIT(gser, gser_alloc_inst, gser_alloc);
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_AUTHOR("Al Borchers");
|
|
|
|
MODULE_AUTHOR("David Brownell");
|