Driver/tiny_serial/tiny_startup()

Last-modified: 2007-09-20 (木) 14:20:00

191 :static int tiny_startup(struct uart_port *port)
192 :{
193 : /* this is the first time this port is opened */
194 : /* do any hardware initialization needed here */
195 :
196 : /* create our timer and submit it */
197 : if (!timer) {
198 : timer = kmalloc(sizeof(*timer), GFP_KERNEL);
199 : if (!timer)
200 : return -ENOMEM;
201 : }
202 : timer->data = (unsigned long)port;
203 : timer->expires = jiffies + DELAY_TIME;
204 : timer->function = tiny_timer;
205 : add_timer(timer);
206 : return 0;
207 :}