2, 在linux-2.6.31.1-cavm1/drivers/usb/gadget中,hid.c文件写法有误.
正确写法为:
[cpp] view plaincopy
- /*
- * hid.c -- HID Composite driver
- *
- * Based on multi.c
- *
- * Copyright (C) 2010 Fabien Chouteau <fabien.chouteau@barco.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
- #include <linux/kernel.h>
- #include <linux/platform_device.h>
- #include <linux/list.h>
- #include <linux/usb/musb.h>
- #define DRIVER_DESC "HID ps3 controller"
- #define DRIVER_VERSION "2011/07/21"
- /*-------------------------------------------------------------------------*/
- #define HIDG_VENDOR_NUM 0x0525 /* XXX NetChip */
- #define HIDG_PRODUCT_NUM 0xa4ac /* Linux-USB HID gadget */
- /*-------------------------------------------------------------------------*/
- /*
- * kbuild is not very cooperative with respect to linking separately
- * compiled library objects into one module. So for now we won't use
- * separate compilation ... ensuring init/exit sections work to shrink
- * the runtime footprint, and giving us at least some parts of what
- * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
- */
- #include "composite.c"
- #include "usbstring.c"
- #include "config.c"
- #include "epautoconf.c"
- #include "f_hid.c"
- struct hidg_func_node {
- struct list_head node;
- struct hidg_func_descriptor *func;
- };
|