···7070 *7171 * Bulk endpoints can use any size buffers, and can also be used for interrupt7272 * transfers. interrupt-only endpoints can be much less functional.7373+ *7474+ * NOTE: this is analagous to 'struct urb' on the host side, except that7575+ * it's thinner and promotes more pre-allocation.7376 */7474- // NOTE this is analagous to 'struct urb' on the host side,7575- // except that it's thinner and promotes more pre-allocation.76777778struct usb_request {7879 void *buf;···169168 *170169 * returns zero, or a negative error code.171170 */172172-static inline int173173-usb_ep_enable (struct usb_ep *ep, const struct usb_endpoint_descriptor *desc)171171+static inline int usb_ep_enable(struct usb_ep *ep,172172+ const struct usb_endpoint_descriptor *desc)174173{175175- return ep->ops->enable (ep, desc);174174+ return ep->ops->enable(ep, desc);176175}177176178177/**···187186 *188187 * returns zero, or a negative error code.189188 */190190-static inline int191191-usb_ep_disable (struct usb_ep *ep)189189+static inline int usb_ep_disable(struct usb_ep *ep)192190{193193- return ep->ops->disable (ep);191191+ return ep->ops->disable(ep);194192}195193196194/**···206206 *207207 * Returns the request, or null if one could not be allocated.208208 */209209-static inline struct usb_request *210210-usb_ep_alloc_request (struct usb_ep *ep, gfp_t gfp_flags)209209+static inline struct usb_request *usb_ep_alloc_request(struct usb_ep *ep,210210+ gfp_t gfp_flags)211211{212212- return ep->ops->alloc_request (ep, gfp_flags);212212+ return ep->ops->alloc_request(ep, gfp_flags);213213}214214215215/**···221221 * Caller guarantees the request is not queued, and that it will222222 * no longer be requeued (or otherwise used).223223 */224224-static inline void225225-usb_ep_free_request (struct usb_ep *ep, struct usb_request *req)224224+static inline void usb_ep_free_request(struct usb_ep *ep,225225+ struct usb_request *req)226226{227227- ep->ops->free_request (ep, req);227227+ ep->ops->free_request(ep, req);228228}229229230230/**···281281 * report errors; errors will also be282282 * reported when the usb peripheral is disconnected.283283 */284284-static inline int285285-usb_ep_queue (struct usb_ep *ep, struct usb_request *req, gfp_t gfp_flags)284284+static inline int usb_ep_queue(struct usb_ep *ep,285285+ struct usb_request *req, gfp_t gfp_flags)286286{287287- return ep->ops->queue (ep, req, gfp_flags);287287+ return ep->ops->queue(ep, req, gfp_flags);288288}289289290290/**···301301 * restrictions prevent drivers from supporting configuration changes,302302 * even to configuration zero (a "chapter 9" requirement).303303 */304304-static inline int usb_ep_dequeue (struct usb_ep *ep, struct usb_request *req)304304+static inline int usb_ep_dequeue(struct usb_ep *ep, struct usb_request *req)305305{306306- return ep->ops->dequeue (ep, req);306306+ return ep->ops->dequeue(ep, req);307307}308308309309/**···327327 * transfer requests are still queued, or if the controller hardware328328 * (usually a FIFO) still holds bytes that the host hasn't collected.329329 */330330-static inline int331331-usb_ep_set_halt (struct usb_ep *ep)330330+static inline int usb_ep_set_halt(struct usb_ep *ep)332331{333333- return ep->ops->set_halt (ep, 1);332332+ return ep->ops->set_halt(ep, 1);334333}335334336335/**···345346 * Note that some hardware can't support this request (like pxa2xx_udc),346347 * and accordingly can't correctly implement interface altsettings.347348 */348348-static inline int349349-usb_ep_clear_halt (struct usb_ep *ep)349349+static inline int usb_ep_clear_halt(struct usb_ep *ep)350350{351351- return ep->ops->set_halt (ep, 0);351351+ return ep->ops->set_halt(ep, 0);352352}353353354354/**···365367 * errno if the endpoint doesn't use a FIFO or doesn't support such366368 * precise handling.367369 */368368-static inline int369369-usb_ep_fifo_status (struct usb_ep *ep)370370+static inline int usb_ep_fifo_status(struct usb_ep *ep)370371{371372 if (ep->ops->fifo_status)372372- return ep->ops->fifo_status (ep);373373+ return ep->ops->fifo_status(ep);373374 else374375 return -EOPNOTSUPP;375376}···382385 * must never be used except when endpoint is not being used for any383386 * protocol translation.384387 */385385-static inline void386386-usb_ep_fifo_flush (struct usb_ep *ep)388388+static inline void usb_ep_fifo_flush(struct usb_ep *ep)387389{388390 if (ep->ops->fifo_flush)389389- ep->ops->fifo_flush (ep);391391+ ep->ops->fifo_flush(ep);390392}391393392394···465469 struct device dev;466470};467471468468-static inline void set_gadget_data (struct usb_gadget *gadget, void *data)469469- { dev_set_drvdata (&gadget->dev, data); }470470-static inline void *get_gadget_data (struct usb_gadget *gadget)471471- { return dev_get_drvdata (&gadget->dev); }472472+static inline void set_gadget_data(struct usb_gadget *gadget, void *data)473473+ { dev_set_drvdata(&gadget->dev, data); }474474+static inline void *get_gadget_data(struct usb_gadget *gadget)475475+ { return dev_get_drvdata(&gadget->dev); }472476473477/* iterates the non-control endpoints; 'tmp' is a struct usb_ep pointer */474478#define gadget_for_each_ep(tmp,gadget) \···507511#endif508512}509513510510-511514/**512515 * usb_gadget_frame_number - returns the current frame number513516 * @gadget: controller that reports the frame number···514519 * Returns the usb frame number, normally eleven bits from a SOF packet,515520 * or negative errno if this device doesn't support this capability.516521 */517517-static inline int usb_gadget_frame_number (struct usb_gadget *gadget)522522+static inline int usb_gadget_frame_number(struct usb_gadget *gadget)518523{519519- return gadget->ops->get_frame (gadget);524524+ return gadget->ops->get_frame(gadget);520525}521526522527/**···532537 * even if OTG isn't otherwise in use. OTG devices may also start533538 * remote wakeup even when hosts don't explicitly enable it.534539 */535535-static inline int usb_gadget_wakeup (struct usb_gadget *gadget)540540+static inline int usb_gadget_wakeup(struct usb_gadget *gadget)536541{537542 if (!gadget->ops->wakeup)538543 return -EOPNOTSUPP;539539- return gadget->ops->wakeup (gadget);544544+ return gadget->ops->wakeup(gadget);540545}541546542547/**···548553 *549554 * returns zero on success, else negative errno.550555 */551551-static inline int552552-usb_gadget_set_selfpowered (struct usb_gadget *gadget)556556+static inline int usb_gadget_set_selfpowered(struct usb_gadget *gadget)553557{554558 if (!gadget->ops->set_selfpowered)555559 return -EOPNOTSUPP;556556- return gadget->ops->set_selfpowered (gadget, 1);560560+ return gadget->ops->set_selfpowered(gadget, 1);557561}558562559563/**···565571 *566572 * returns zero on success, else negative errno.567573 */568568-static inline int569569-usb_gadget_clear_selfpowered (struct usb_gadget *gadget)574574+static inline int usb_gadget_clear_selfpowered(struct usb_gadget *gadget)570575{571576 if (!gadget->ops->set_selfpowered)572577 return -EOPNOTSUPP;573573- return gadget->ops->set_selfpowered (gadget, 0);578578+ return gadget->ops->set_selfpowered(gadget, 0);574579}575580576581/**···584591 *585592 * Returns zero on success, else negative errno.586593 */587587-static inline int588588-usb_gadget_vbus_connect(struct usb_gadget *gadget)594594+static inline int usb_gadget_vbus_connect(struct usb_gadget *gadget)589595{590596 if (!gadget->ops->vbus_session)591597 return -EOPNOTSUPP;592592- return gadget->ops->vbus_session (gadget, 1);598598+ return gadget->ops->vbus_session(gadget, 1);593599}594600595601/**···603611 *604612 * Returns zero on success, else negative errno.605613 */606606-static inline int607607-usb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA)614614+static inline int usb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA)608615{609616 if (!gadget->ops->vbus_draw)610617 return -EOPNOTSUPP;611611- return gadget->ops->vbus_draw (gadget, mA);618618+ return gadget->ops->vbus_draw(gadget, mA);612619}613620614621/**···620629 *621630 * Returns zero on success, else negative errno.622631 */623623-static inline int624624-usb_gadget_vbus_disconnect(struct usb_gadget *gadget)632632+static inline int usb_gadget_vbus_disconnect(struct usb_gadget *gadget)625633{626634 if (!gadget->ops->vbus_session)627635 return -EOPNOTSUPP;628628- return gadget->ops->vbus_session (gadget, 0);636636+ return gadget->ops->vbus_session(gadget, 0);629637}630638631639/**···638648 *639649 * Returns zero on success, else negative errno.640650 */641641-static inline int642642-usb_gadget_connect (struct usb_gadget *gadget)651651+static inline int usb_gadget_connect(struct usb_gadget *gadget)643652{644653 if (!gadget->ops->pullup)645654 return -EOPNOTSUPP;646646- return gadget->ops->pullup (gadget, 1);655655+ return gadget->ops->pullup(gadget, 1);647656}648657649658/**···660671 *661672 * Returns zero on success, else negative errno.662673 */663663-static inline int664664-usb_gadget_disconnect (struct usb_gadget *gadget)674674+static inline int usb_gadget_disconnect(struct usb_gadget *gadget)665675{666676 if (!gadget->ops->pullup)667677 return -EOPNOTSUPP;668668- return gadget->ops->pullup (gadget, 0);678678+ return gadget->ops->pullup(gadget, 0);669679}670670-671680672681673682/*-------------------------------------------------------------------------*/···751764 void (*suspend)(struct usb_gadget *);752765 void (*resume)(struct usb_gadget *);753766754754- // FIXME support safe rmmod767767+ /* FIXME support safe rmmod */755768 struct device_driver driver;756769};757770···777790 * the bind() functions will be in init sections.778791 * This function must be called in a context that can sleep.779792 */780780-int usb_gadget_register_driver (struct usb_gadget_driver *driver);793793+int usb_gadget_register_driver(struct usb_gadget_driver *driver);781794782795/**783796 * usb_gadget_unregister_driver - unregister a gadget driver···792805 * will in in exit sections, so may not be linked in some kernels.793806 * This function must be called in a context that can sleep.794807 */795795-int usb_gadget_unregister_driver (struct usb_gadget_driver *driver);808808+int usb_gadget_unregister_driver(struct usb_gadget_driver *driver);796809797810/*-------------------------------------------------------------------------*/798811···825838};826839827840/* put descriptor for string with that id into buf (buflen >= 256) */828828-int usb_gadget_get_string (struct usb_gadget_strings *table, int id, u8 *buf);841841+int usb_gadget_get_string(struct usb_gadget_strings *table, int id, u8 *buf);829842830843/*-------------------------------------------------------------------------*/831844···843856844857/* utility wrapping a simple endpoint selection policy */845858846846-extern struct usb_ep *usb_ep_autoconfig (struct usb_gadget *,859859+extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *,847860 struct usb_endpoint_descriptor *) __devinit;848861849849-extern void usb_ep_autoconfig_reset (struct usb_gadget *) __devinit;862862+extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit;850863851864#endif /* __KERNEL__ */852865
+12-10
include/linux/usb/gadgetfs.h
···3636 GADGETFS_DISCONNECT,3737 GADGETFS_SETUP,3838 GADGETFS_SUSPEND,3939- // and likely more !3939+ /* and likely more ! */4040};41414242/* NOTE: this structure must stay the same size and layout on···4444 */4545struct usb_gadgetfs_event {4646 union {4747- // NOP, DISCONNECT, SUSPEND: nothing4848- // ... some hardware can't report disconnection4747+ /* NOP, DISCONNECT, SUSPEND: nothing4848+ * ... some hardware can't report disconnection4949+ */49505050- // CONNECT: just the speed5151+ /* CONNECT: just the speed */5152 enum usb_device_speed speed;52535353- // SETUP: packet; DATA phase i/o precedes next event5454- // (setup.bmRequestType & USB_DIR_IN) flags direction5555- // ... includes SET_CONFIGURATION, SET_INTERFACE5454+ /* SETUP: packet; DATA phase i/o precedes next event5555+ *(setup.bmRequestType & USB_DIR_IN) flags direction5656+ * ... includes SET_CONFIGURATION, SET_INTERFACE5757+ */5658 struct usb_ctrlrequest setup;5759 } u;5860 enum usb_gadgetfs_event_type type;···7573 * THIS returns how many bytes are "unclaimed" in the endpoint fifo7674 * (needed for precise fault handling, when the hardware allows it)7775 */7878-#define GADGETFS_FIFO_STATUS _IO('g',1)7676+#define GADGETFS_FIFO_STATUS _IO('g', 1)79778078/* discards any unclaimed data in the fifo. */8181-#define GADGETFS_FIFO_FLUSH _IO('g',2)7979+#define GADGETFS_FIFO_FLUSH _IO('g', 2)82808381/* resets endpoint halt+toggle; used to implement set_interface.8482 * some hardware (like pxa2xx) can't support this.8583 */8686-#define GADGETFS_CLEAR_HALT _IO('g',3)8484+#define GADGETFS_CLEAR_HALT _IO('g', 3)87858886#endif /* __LINUX_USB_GADGETFS_H */
+17-8
include/linux/usb/iowarrior.h
···1414 this information.1515*/1616struct iowarrior_info {1717- __u32 vendor; /* vendor id : supposed to be USB_VENDOR_ID_CODEMERCS in all cases */1818- __u32 product; /* product id : depends on type of chip (USB_DEVICE_ID_CODEMERCS_XXXXX) */1919- __u8 serial[9]; /* the serial number of our chip (if a serial-number is not available this is empty string) */2020- __u32 revision; /* revision number of the chip */2121- __u32 speed; /* USB-speed of the device (0=UNKNOWN, 1=LOW, 2=FULL 3=HIGH) */2222- __u32 power; /* power consumption of the device in mA */2323- __u32 if_num; /* the number of the endpoint */2424- __u32 report_size; /* size of the data-packets on this interface */1717+ /* vendor id : supposed to be USB_VENDOR_ID_CODEMERCS in all cases */1818+ __u32 vendor;1919+ /* product id : depends on type of chip (USB_DEVICE_ID_CODEMERCS_X) */2020+ __u32 product;2121+ /* the serial number of our chip (if a serial-number is not available2222+ * this is empty string) */2323+ __u8 serial[9];2424+ /* revision number of the chip */2525+ __u32 revision;2626+ /* USB-speed of the device (0=UNKNOWN, 1=LOW, 2=FULL 3=HIGH) */2727+ __u32 speed;2828+ /* power consumption of the device in mA */2929+ __u32 power;3030+ /* the number of the endpoint */3131+ __u32 if_num;3232+ /* size of the data-packets on this interface */3333+ __u32 report_size;2534};26352736/*
+1-1
include/linux/usb/isp116x.h
···2525 300ns delay between access to ADDR_REG and DATA_REG2626 OE, WE MUST NOT be changed during these intervals2727 */2828- void (*delay) (struct device * dev, int delay);2828+ void (*delay) (struct device *dev, int delay);2929};
···11-// include/linux/usb/otg.h11+/* USB OTG (On The Go) defines */2233/*44 * These APIs may be used between USB controllers. USB device drivers
+86-69
include/linux/usb/serial.h
···2020#define SERIAL_TTY_MAJOR 188 /* Nice legal number now */2121#define SERIAL_TTY_MINORS 255 /* loads of devices :) */22222323-#define MAX_NUM_PORTS 8 /* The maximum number of ports one device can grab at once */2323+/* The maximum number of ports one device can grab at once */2424+#define MAX_NUM_PORTS 824252526/* parity check flag */2627#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))···6261 * ports of a device.6362 */6463struct usb_serial_port {6565- struct usb_serial * serial;6666- struct tty_struct * tty;6464+ struct usb_serial *serial;6565+ struct tty_struct *tty;6766 spinlock_t lock;6867 struct mutex mutex;6968 unsigned char number;70697171- unsigned char * interrupt_in_buffer;7272- struct urb * interrupt_in_urb;7070+ unsigned char *interrupt_in_buffer;7171+ struct urb *interrupt_in_urb;7372 __u8 interrupt_in_endpointAddress;74737575- unsigned char * interrupt_out_buffer;7474+ unsigned char *interrupt_out_buffer;7675 int interrupt_out_size;7777- struct urb * interrupt_out_urb;7676+ struct urb *interrupt_out_urb;7877 __u8 interrupt_out_endpointAddress;79788080- unsigned char * bulk_in_buffer;7979+ unsigned char *bulk_in_buffer;8180 int bulk_in_size;8282- struct urb * read_urb;8181+ struct urb *read_urb;8382 __u8 bulk_in_endpointAddress;84838585- unsigned char * bulk_out_buffer;8484+ unsigned char *bulk_out_buffer;8685 int bulk_out_size;8787- struct urb * write_urb;8686+ struct urb *write_urb;8887 int write_urb_busy;8988 __u8 bulk_out_endpointAddress;9089···9998#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)10099101100/* get and set the port private data pointer helper functions */102102-static inline void *usb_get_serial_port_data (struct usb_serial_port *port)101101+static inline void *usb_get_serial_port_data(struct usb_serial_port *port)103102{104103 return dev_get_drvdata(&port->dev);105104}106105107107-static inline void usb_set_serial_port_data (struct usb_serial_port *port, void *data)106106+static inline void usb_set_serial_port_data(struct usb_serial_port *port,107107+ void *data)108108{109109 dev_set_drvdata(&port->dev, data);110110}···128126 * usb_set_serial_data() to access this.129127 */130128struct usb_serial {131131- struct usb_device * dev;132132- struct usb_serial_driver * type;133133- struct usb_interface * interface;129129+ struct usb_device *dev;130130+ struct usb_serial_driver *type;131131+ struct usb_interface *interface;134132 unsigned char disconnected;135133 unsigned char minor;136134 unsigned char num_ports;···139137 char num_interrupt_out;140138 char num_bulk_in;141139 char num_bulk_out;142142- struct usb_serial_port * port[MAX_NUM_PORTS];140140+ struct usb_serial_port *port[MAX_NUM_PORTS];143141 struct kref kref;144142 struct mutex disc_mutex;145145- void * private;143143+ void *private;146144};147145#define to_usb_serial(d) container_of(d, struct usb_serial, kref)148146149147#define NUM_DONT_CARE 99150148151149/* get and set the serial private data pointer helper functions */152152-static inline void *usb_get_serial_data (struct usb_serial *serial)150150+static inline void *usb_get_serial_data(struct usb_serial *serial)153151{154152 return serial->private;155153}156154157157-static inline void usb_set_serial_data (struct usb_serial *serial, void *data)155155+static inline void usb_set_serial_data(struct usb_serial *serial, void *data)158156{159157 serial->private = data;160158}161159162160/**163161 * usb_serial_driver - describes a usb serial driver164164- * @description: pointer to a string that describes this driver. This string used165165- * in the syslog messages when a device is inserted or removed.162162+ * @description: pointer to a string that describes this driver. This string163163+ * used in the syslog messages when a device is inserted or removed.166164 * @id_table: pointer to a list of usb_device_id structures that define all167165 * of the devices this structure can support.168166 * @num_interrupt_in: If a device doesn't have this many interrupt-in···223221 struct usb_driver *usb_driver;224222 struct usb_dynids dynids;225223226226- int (*probe) (struct usb_serial *serial, const struct usb_device_id *id);227227- int (*attach) (struct usb_serial *serial);224224+ int (*probe)(struct usb_serial *serial, const struct usb_device_id *id);225225+ int (*attach)(struct usb_serial *serial);228226 int (*calc_num_ports) (struct usb_serial *serial);229227230230- void (*shutdown) (struct usb_serial *serial);228228+ void (*shutdown)(struct usb_serial *serial);231229232232- int (*port_probe) (struct usb_serial_port *port);233233- int (*port_remove) (struct usb_serial_port *port);230230+ int (*port_probe)(struct usb_serial_port *port);231231+ int (*port_remove)(struct usb_serial_port *port);234232235235- int (*suspend) (struct usb_serial *serial, pm_message_t message);236236- int (*resume) (struct usb_serial *serial);233233+ int (*suspend)(struct usb_serial *serial, pm_message_t message);234234+ int (*resume)(struct usb_serial *serial);237235238236 /* serial function calls */239239- int (*open) (struct usb_serial_port *port, struct file * filp);240240- void (*close) (struct usb_serial_port *port, struct file * filp);241241- int (*write) (struct usb_serial_port *port, const unsigned char *buf, int count);242242- int (*write_room) (struct usb_serial_port *port);243243- int (*ioctl) (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);244244- void (*set_termios) (struct usb_serial_port *port, struct ktermios * old);245245- void (*break_ctl) (struct usb_serial_port *port, int break_state);246246- int (*chars_in_buffer) (struct usb_serial_port *port);247247- void (*throttle) (struct usb_serial_port *port);248248- void (*unthrottle) (struct usb_serial_port *port);249249- int (*tiocmget) (struct usb_serial_port *port, struct file *file);250250- int (*tiocmset) (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);237237+ int (*open)(struct usb_serial_port *port, struct file *filp);238238+ void (*close)(struct usb_serial_port *port, struct file *filp);239239+ int (*write)(struct usb_serial_port *port, const unsigned char *buf,240240+ int count);241241+ int (*write_room)(struct usb_serial_port *port);242242+ int (*ioctl)(struct usb_serial_port *port, struct file *file,243243+ unsigned int cmd, unsigned long arg);244244+ void (*set_termios)(struct usb_serial_port *port, struct ktermios *old);245245+ void (*break_ctl)(struct usb_serial_port *port, int break_state);246246+ int (*chars_in_buffer)(struct usb_serial_port *port);247247+ void (*throttle)(struct usb_serial_port *port);248248+ void (*unthrottle)(struct usb_serial_port *port);249249+ int (*tiocmget)(struct usb_serial_port *port, struct file *file);250250+ int (*tiocmset)(struct usb_serial_port *port, struct file *file,251251+ unsigned int set, unsigned int clear);251252252253 void (*read_int_callback)(struct urb *urb);253254 void (*write_int_callback)(struct urb *urb);254255 void (*read_bulk_callback)(struct urb *urb);255256 void (*write_bulk_callback)(struct urb *urb);256257};257257-#define to_usb_serial_driver(d) container_of(d, struct usb_serial_driver, driver)258258+#define to_usb_serial_driver(d) \259259+ container_of(d, struct usb_serial_driver, driver)258260259261extern int usb_serial_register(struct usb_serial_driver *driver);260262extern void usb_serial_deregister(struct usb_serial_driver *driver);261263extern void usb_serial_port_softint(struct usb_serial_port *port);262264263263-extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id);265265+extern int usb_serial_probe(struct usb_interface *iface,266266+ const struct usb_device_id *id);264267extern void usb_serial_disconnect(struct usb_interface *iface);265268266269extern int usb_serial_suspend(struct usb_interface *intf, pm_message_t message);267270extern int usb_serial_resume(struct usb_interface *intf);268271269269-extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest);270270-extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit);272272+extern int ezusb_writememory(struct usb_serial *serial, int address,273273+ unsigned char *data, int length, __u8 bRequest);274274+extern int ezusb_set_reset(struct usb_serial *serial, unsigned char reset_bit);271275272276/* USB Serial console functions */273277#ifdef CONFIG_USB_SERIAL_CONSOLE274274-extern void usb_serial_console_init (int debug, int minor);275275-extern void usb_serial_console_exit (void);278278+extern void usb_serial_console_init(int debug, int minor);279279+extern void usb_serial_console_exit(void);276280extern void usb_serial_console_disconnect(struct usb_serial *serial);277281#else278278-static inline void usb_serial_console_init (int debug, int minor) { }279279-static inline void usb_serial_console_exit (void) { }282282+static inline void usb_serial_console_init(int debug, int minor) { }283283+static inline void usb_serial_console_exit(void) { }280284static inline void usb_serial_console_disconnect(struct usb_serial *serial) {}281285#endif282286283287/* Functions needed by other parts of the usbserial core */284284-extern struct usb_serial *usb_serial_get_by_index (unsigned int minor);288288+extern struct usb_serial *usb_serial_get_by_index(unsigned int minor);285289extern void usb_serial_put(struct usb_serial *serial);286286-extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp);287287-extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count);288288-extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp);289289-extern int usb_serial_generic_resume (struct usb_serial *serial);290290-extern int usb_serial_generic_write_room (struct usb_serial_port *port);291291-extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port);292292-extern void usb_serial_generic_read_bulk_callback (struct urb *urb);293293-extern void usb_serial_generic_write_bulk_callback (struct urb *urb);294294-extern void usb_serial_generic_throttle (struct usb_serial_port *port);295295-extern void usb_serial_generic_unthrottle (struct usb_serial_port *port);296296-extern void usb_serial_generic_shutdown (struct usb_serial *serial);297297-extern int usb_serial_generic_register (int debug);298298-extern void usb_serial_generic_deregister (void);290290+extern int usb_serial_generic_open(struct usb_serial_port *port,291291+ struct file *filp);292292+extern int usb_serial_generic_write(struct usb_serial_port *port,293293+ const unsigned char *buf, int count);294294+extern void usb_serial_generic_close(struct usb_serial_port *port,295295+ struct file *filp);296296+extern int usb_serial_generic_resume(struct usb_serial *serial);297297+extern int usb_serial_generic_write_room(struct usb_serial_port *port);298298+extern int usb_serial_generic_chars_in_buffer(struct usb_serial_port *port);299299+extern void usb_serial_generic_read_bulk_callback(struct urb *urb);300300+extern void usb_serial_generic_write_bulk_callback(struct urb *urb);301301+extern void usb_serial_generic_throttle(struct usb_serial_port *port);302302+extern void usb_serial_generic_unthrottle(struct usb_serial_port *port);303303+extern void usb_serial_generic_shutdown(struct usb_serial *serial);304304+extern int usb_serial_generic_register(int debug);305305+extern void usb_serial_generic_deregister(void);299306300300-extern int usb_serial_bus_register (struct usb_serial_driver *device);301301-extern void usb_serial_bus_deregister (struct usb_serial_driver *device);307307+extern int usb_serial_bus_register(struct usb_serial_driver *device);308308+extern void usb_serial_bus_deregister(struct usb_serial_driver *device);302309303310extern struct usb_serial_driver usb_serial_generic_device;304311extern struct bus_type usb_serial_bus_type;···321310 int i;322311323312 if (debug) {324324- dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = ", function, size);313313+ dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = ",314314+ function, size);325315 for (i = 0; i < size; ++i)326326- printk ("%.2x ", data[i]);327327- printk ("\n");316316+ printk("%.2x ", data[i]);317317+ printk("\n");328318 }329319}330320331321/* Use our own dbg macro */332322#undef dbg333333-#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg); } while (0)323323+#define dbg(format, arg...) \324324+ do { \325325+ if (debug) \326326+ printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , \327327+ ## arg); \328328+ } while (0)334329335330336331
+3-3
include/linux/usb/sl811.h
···1919 /* pulse sl811 nRST (probably with a GPIO) */2020 void (*reset)(struct device *dev);21212222- // some boards need something like these:2323- // int (*check_overcurrent)(struct device *dev);2424- // void (*clock_enable)(struct device *dev, int is_on);2222+ /* some boards need something like these: */2323+ /* int (*check_overcurrent)(struct device *dev); */2424+ /* void (*clock_enable)(struct device *dev, int is_on); */2525};2626