USB: u132-hcd: host controller driver for ELAN U132 adapter
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · Tony Olech
+ #include <
linux/config.h>
+ #include <linux/kernel.h>
+ #include <linux/version.h>
+ #include <linux/module.h>
+ #include <linux/moduleparam.h>
+ #include <linux/delay.h>
+ #include <linux/ioport.h>
+ #include <linux/sched.h>
+ #include <linux/slab.h>
+ #include <linux/smp_lock.h>
+ #include <linux/errno.h>
+ #include <linux/init.h>
+ #include <linux/timer.h>
+ #include <linux/list.h>
Quoted 8 lines
+ #include <
linux/interrupt.h>
+ #include <linux/usb.h>
+ #include <linux/workqueue.h>
+ #include <linux/platform_device.h>
+ #include <linux/pci_ids.h>
+ #ifLINUX_VERSION_CODE<KERNEL_VERSION(2, 6, 16)
+ #error you need at least 2.6.16 to get mutexes
+ #endif
That check doesn't mean anything in a driver that is in the kernel tree. You can remove it.
Quoted 25 lines
+ #include <
asm/io.h>
+ #include <asm/irq.h>
+ #include <asm/system.h>
+ #include <asm/byteorder.h>
+ #include "../core/hcd.h"
+ #include "ohci.h"
+ #defineOHCI_CONTROL_INITOHCI_CTRL_CBSR
+ #defineOHCI_INTR_INIT(OHCI_INTR_MIE|OHCI_INTR_UE|OHCI_INTR_RD| \(quoted diff) +17
-0+ OHCI_INTR_WDH) + MODULE_AUTHOR("Tony Olech - Elan Digital Systems Limited"); + MODULE_DESCRIPTION("U132 USB Host Controller Driver"); + MODULE_LICENSE("GPL"); + #define INT_MODULE_PARM(n, v) static int n = v;module_param(n, int, 0444) + INT_MODULE_PARM(testing, 0); + /* Some boards misreport power switching/overcurrent*/ + static int distrust_firmware = 1; + module_param(distrust_firmware, bool, 0); + MODULE_PARM_DESC(distrust_firmware, "true to distrust firmware power/overcurren" + "t setup"); + #define U132_INFO(format, arg...) printk(KERN_INFO "u132.%d " format "\n", \ + u132->sequence_num, ## arg) + #define ELAN_INFO(format, arg...) printk(KERN_INFO "u132 " format "\n", ## arg) + #define U132_WARN(format, arg...) printk(KERN_WARNING "u132.%d " format "\n", \ + u132->sequence_num, ## arg) + #define ELAN_WARN(format, arg...) printk(KERN_WARNING "u132 " format "\n", ## \
Review
Quoted 10 lines
(quoted diff) +10
-0+ arg) + #define U132_ERR(format, arg...) printk(KERN_ERR "u132.%d " format "\n", \ + u132->sequence_num, ## arg) + #define ELAN_ERR(format, arg...) printk(KERN_ERR "u132 " format "\n", ## arg) + DECLARE_WAIT_QUEUE_HEAD(u132_hcd_wait); + /* + * u132_module_lock exists to protect access to global variables + * + */ + struct mutex u132_module_lock;
Is it supposed to be global like this? Or can it be static?
thanks,
greg k-h