Lines Matching refs:q40kbd
34 struct q40kbd { struct
41 struct q40kbd *q40kbd = dev_id; in q40kbd_interrupt() local
44 spin_lock_irqsave(&q40kbd->lock, flags); in q40kbd_interrupt()
47 serio_interrupt(q40kbd->port, master_inb(KEYCODE_REG), 0); in q40kbd_interrupt()
51 spin_unlock_irqrestore(&q40kbd->lock, flags); in q40kbd_interrupt()
60 static void q40kbd_flush(struct q40kbd *q40kbd) in q40kbd_flush() argument
65 spin_lock_irqsave(&q40kbd->lock, flags); in q40kbd_flush()
70 spin_unlock_irqrestore(&q40kbd->lock, flags); in q40kbd_flush()
86 struct q40kbd *q40kbd = port->port_data; in q40kbd_open() local
88 q40kbd_flush(q40kbd); in q40kbd_open()
99 struct q40kbd *q40kbd = port->port_data; in q40kbd_close() local
102 q40kbd_flush(q40kbd); in q40kbd_close()
107 struct q40kbd *q40kbd; in q40kbd_probe() local
111 q40kbd = kzalloc(sizeof(*q40kbd), GFP_KERNEL); in q40kbd_probe()
113 if (!q40kbd || !port) { in q40kbd_probe()
118 q40kbd->port = port; in q40kbd_probe()
119 spin_lock_init(&q40kbd->lock); in q40kbd_probe()
124 port->port_data = q40kbd; in q40kbd_probe()
132 DRV_NAME, q40kbd); in q40kbd_probe()
138 serio_register_port(q40kbd->port); in q40kbd_probe()
140 platform_set_drvdata(pdev, q40kbd); in q40kbd_probe()
147 kfree(q40kbd); in q40kbd_probe()
153 struct q40kbd *q40kbd = platform_get_drvdata(pdev); in q40kbd_remove() local
160 serio_unregister_port(q40kbd->port); in q40kbd_remove()
161 free_irq(Q40_IRQ_KEYBOARD, q40kbd); in q40kbd_remove()
162 kfree(q40kbd); in q40kbd_remove()