78 |
.shutdown = nokia_shutdown, |
.shutdown = nokia_shutdown, |
79 |
}; |
}; |
80 |
|
|
|
struct nokia_private { |
|
|
|
|
|
}; |
|
|
|
|
81 |
/* do some startup allocations not currently performed by usb_serial_probe() */ |
/* do some startup allocations not currently performed by usb_serial_probe() */ |
82 |
static int nokia_startup(struct usb_serial *serial) |
static int nokia_startup(struct usb_serial *serial) |
83 |
{ |
{ |
85 |
struct usb_endpoint_descriptor *endpoint; |
struct usb_endpoint_descriptor *endpoint; |
86 |
int buffer_size = 0; |
int buffer_size = 0; |
87 |
|
|
|
struct nokia_private *priv; |
|
|
|
|
88 |
dbg("%s", __FUNCTION__); |
dbg("%s", __FUNCTION__); |
89 |
|
|
90 |
if (serial->interface->altsetting[0].endpoint[0].bEndpointAddress == NOKIA_AT_PORT) { |
if (serial->interface->altsetting[0].endpoint[0].bEndpointAddress == NOKIA_AT_PORT) { |
135 |
} else |
} else |
136 |
return -1; |
return -1; |
137 |
|
|
|
/* allocate the private data structure */ |
|
|
serial->port->private = kmalloc(sizeof(struct nokia_private), GFP_KERNEL); |
|
|
if (!serial->port->private) |
|
|
return -1; /* error */ |
|
|
|
|
|
/* set initial values */ |
|
|
priv = (struct nokia_private *)serial->port->private; |
|
|
|
|
138 |
init_waitqueue_head(&serial->port->write_wait); |
init_waitqueue_head(&serial->port->write_wait); |
139 |
|
|
140 |
return 0; |
return 0; |