|
@@ -48,7 +48,7 @@
|
|
dev_warn(&(instance)->usb_intf->dev, \
|
|
dev_warn(&(instance)->usb_intf->dev, \
|
|
"failed assertion '%s' at line %d", \
|
|
"failed assertion '%s' at line %d", \
|
|
__stringify(x), __LINE__); \
|
|
__stringify(x), __LINE__); \
|
|
- } while(0)
|
|
|
|
|
|
+ } while (0)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#define usb_err(instance, format, arg...) \
|
|
#define usb_err(instance, format, arg...) \
|
|
@@ -59,7 +59,7 @@
|
|
dev_warn(&(instance)->usb_intf->dev , format , ## arg)
|
|
dev_warn(&(instance)->usb_intf->dev , format , ## arg)
|
|
#ifdef DEBUG
|
|
#ifdef DEBUG
|
|
#define usb_dbg(instance, format, arg...) \
|
|
#define usb_dbg(instance, format, arg...) \
|
|
- dev_printk(KERN_DEBUG , &(instance)->usb_intf->dev , format , ## arg)
|
|
|
|
|
|
+ dev_printk(KERN_DEBUG , &(instance)->usb_intf->dev , format , ## arg)
|
|
#else
|
|
#else
|
|
#define usb_dbg(instance, format, arg...) \
|
|
#define usb_dbg(instance, format, arg...) \
|
|
do {} while (0)
|
|
do {} while (0)
|
|
@@ -104,21 +104,21 @@ struct usbatm_data;
|
|
/*
|
|
/*
|
|
* Assuming all methods exist and succeed, they are called in this order:
|
|
* Assuming all methods exist and succeed, they are called in this order:
|
|
*
|
|
*
|
|
-* bind, heavy_init, atm_start, ..., atm_stop, unbind
|
|
|
|
|
|
+* bind, heavy_init, atm_start, ..., atm_stop, unbind
|
|
*/
|
|
*/
|
|
|
|
|
|
struct usbatm_driver {
|
|
struct usbatm_driver {
|
|
const char *driver_name;
|
|
const char *driver_name;
|
|
|
|
|
|
/* init device ... can sleep, or cause probe() failure */
|
|
/* init device ... can sleep, or cause probe() failure */
|
|
- int (*bind) (struct usbatm_data *, struct usb_interface *,
|
|
|
|
|
|
+ int (*bind) (struct usbatm_data *, struct usb_interface *,
|
|
const struct usb_device_id *id);
|
|
const struct usb_device_id *id);
|
|
|
|
|
|
/* additional device initialization that is too slow to be done in probe() */
|
|
/* additional device initialization that is too slow to be done in probe() */
|
|
- int (*heavy_init) (struct usbatm_data *, struct usb_interface *);
|
|
|
|
|
|
+ int (*heavy_init) (struct usbatm_data *, struct usb_interface *);
|
|
|
|
|
|
/* cleanup device ... can sleep, but can't fail */
|
|
/* cleanup device ... can sleep, but can't fail */
|
|
- void (*unbind) (struct usbatm_data *, struct usb_interface *);
|
|
|
|
|
|
+ void (*unbind) (struct usbatm_data *, struct usb_interface *);
|
|
|
|
|
|
/* init ATM device ... can sleep, or cause ATM initialization failure */
|
|
/* init ATM device ... can sleep, or cause ATM initialization failure */
|
|
int (*atm_start) (struct usbatm_data *, struct atm_dev *);
|
|
int (*atm_start) (struct usbatm_data *, struct atm_dev *);
|
|
@@ -126,9 +126,9 @@ struct usbatm_driver {
|
|
/* cleanup ATM device ... can sleep, but can't fail */
|
|
/* cleanup ATM device ... can sleep, but can't fail */
|
|
void (*atm_stop) (struct usbatm_data *, struct atm_dev *);
|
|
void (*atm_stop) (struct usbatm_data *, struct atm_dev *);
|
|
|
|
|
|
- int bulk_in; /* bulk rx endpoint */
|
|
|
|
- int isoc_in; /* isochronous rx endpoint */
|
|
|
|
- int bulk_out; /* bulk tx endpoint */
|
|
|
|
|
|
+ int bulk_in; /* bulk rx endpoint */
|
|
|
|
+ int isoc_in; /* isochronous rx endpoint */
|
|
|
|
+ int bulk_out; /* bulk tx endpoint */
|
|
|
|
|
|
unsigned rx_padding;
|
|
unsigned rx_padding;
|
|
unsigned tx_padding;
|
|
unsigned tx_padding;
|
|
@@ -156,7 +156,7 @@ struct usbatm_channel {
|
|
struct usbatm_data {
|
|
struct usbatm_data {
|
|
/******************
|
|
/******************
|
|
* public fields *
|
|
* public fields *
|
|
- ******************/
|
|
|
|
|
|
+ ******************/
|
|
|
|
|
|
/* mini driver */
|
|
/* mini driver */
|
|
struct usbatm_driver *driver;
|
|
struct usbatm_driver *driver;
|
|
@@ -174,7 +174,7 @@ struct usbatm_data {
|
|
|
|
|
|
/********************************
|
|
/********************************
|
|
* private fields - do not use *
|
|
* private fields - do not use *
|
|
- ********************************/
|
|
|
|
|
|
+ ********************************/
|
|
|
|
|
|
struct kref refcount;
|
|
struct kref refcount;
|
|
struct mutex serialize;
|
|
struct mutex serialize;
|