diff options
Diffstat (limited to 'drivers/usb/serial/cyberjack.c')
-rw-r--r-- | drivers/usb/serial/cyberjack.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 5f17a3b9916d..80260b08398b 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #define CYBERJACK_PRODUCT_ID 0x0100 | 50 | #define CYBERJACK_PRODUCT_ID 0x0100 |
51 | 51 | ||
52 | /* Function prototypes */ | 52 | /* Function prototypes */ |
53 | static int cyberjack_attach(struct usb_serial *serial); | ||
53 | static int cyberjack_port_probe(struct usb_serial_port *port); | 54 | static int cyberjack_port_probe(struct usb_serial_port *port); |
54 | static int cyberjack_port_remove(struct usb_serial_port *port); | 55 | static int cyberjack_port_remove(struct usb_serial_port *port); |
55 | static int cyberjack_open(struct tty_struct *tty, | 56 | static int cyberjack_open(struct tty_struct *tty, |
@@ -77,6 +78,7 @@ static struct usb_serial_driver cyberjack_device = { | |||
77 | .description = "Reiner SCT Cyberjack USB card reader", | 78 | .description = "Reiner SCT Cyberjack USB card reader", |
78 | .id_table = id_table, | 79 | .id_table = id_table, |
79 | .num_ports = 1, | 80 | .num_ports = 1, |
81 | .attach = cyberjack_attach, | ||
80 | .port_probe = cyberjack_port_probe, | 82 | .port_probe = cyberjack_port_probe, |
81 | .port_remove = cyberjack_port_remove, | 83 | .port_remove = cyberjack_port_remove, |
82 | .open = cyberjack_open, | 84 | .open = cyberjack_open, |
@@ -100,6 +102,14 @@ struct cyberjack_private { | |||
100 | short wrsent; /* Data already sent */ | 102 | short wrsent; /* Data already sent */ |
101 | }; | 103 | }; |
102 | 104 | ||
105 | static int cyberjack_attach(struct usb_serial *serial) | ||
106 | { | ||
107 | if (serial->num_bulk_out < serial->num_ports) | ||
108 | return -ENODEV; | ||
109 | |||
110 | return 0; | ||
111 | } | ||
112 | |||
103 | static int cyberjack_port_probe(struct usb_serial_port *port) | 113 | static int cyberjack_port_probe(struct usb_serial_port *port) |
104 | { | 114 | { |
105 | struct cyberjack_private *priv; | 115 | struct cyberjack_private *priv; |