Lines Matching refs:vuart_bus_priv
861 static struct vuart_bus_priv { struct
867 } vuart_bus_priv; argument
879 struct vuart_bus_priv *bus_priv = _private; in ps3_vuart_irq_handler()
908 vuart_bus_priv.use_count++; in ps3_vuart_bus_interrupt_get()
910 BUG_ON(vuart_bus_priv.use_count > 2); in ps3_vuart_bus_interrupt_get()
912 if (vuart_bus_priv.use_count != 1) in ps3_vuart_bus_interrupt_get()
915 BUG_ON(vuart_bus_priv.bmp); in ps3_vuart_bus_interrupt_get()
917 vuart_bus_priv.bmp = kzalloc(sizeof(struct ports_bmp), GFP_KERNEL); in ps3_vuart_bus_interrupt_get()
919 if (!vuart_bus_priv.bmp) { in ps3_vuart_bus_interrupt_get()
924 result = ps3_vuart_irq_setup(PS3_BINDING_CPU_ANY, vuart_bus_priv.bmp, in ps3_vuart_bus_interrupt_get()
925 &vuart_bus_priv.virq); in ps3_vuart_bus_interrupt_get()
934 result = request_irq(vuart_bus_priv.virq, ps3_vuart_irq_handler, in ps3_vuart_bus_interrupt_get()
935 0, "vuart", &vuart_bus_priv); in ps3_vuart_bus_interrupt_get()
947 ps3_vuart_irq_destroy(vuart_bus_priv.virq); in ps3_vuart_bus_interrupt_get()
948 vuart_bus_priv.virq = 0; in ps3_vuart_bus_interrupt_get()
950 kfree(vuart_bus_priv.bmp); in ps3_vuart_bus_interrupt_get()
951 vuart_bus_priv.bmp = NULL; in ps3_vuart_bus_interrupt_get()
953 vuart_bus_priv.use_count--; in ps3_vuart_bus_interrupt_get()
962 vuart_bus_priv.use_count--; in ps3_vuart_bus_interrupt_put()
964 BUG_ON(vuart_bus_priv.use_count < 0); in ps3_vuart_bus_interrupt_put()
966 if (vuart_bus_priv.use_count != 0) in ps3_vuart_bus_interrupt_put()
969 free_irq(vuart_bus_priv.virq, &vuart_bus_priv); in ps3_vuart_bus_interrupt_put()
971 ps3_vuart_irq_destroy(vuart_bus_priv.virq); in ps3_vuart_bus_interrupt_put()
972 vuart_bus_priv.virq = 0; in ps3_vuart_bus_interrupt_put()
974 kfree(vuart_bus_priv.bmp); in ps3_vuart_bus_interrupt_put()
975 vuart_bus_priv.bmp = NULL; in ps3_vuart_bus_interrupt_put()
1000 mutex_lock(&vuart_bus_priv.probe_mutex); in ps3_vuart_probe()
1007 if (vuart_bus_priv.devices[dev->port_number]) { in ps3_vuart_probe()
1014 vuart_bus_priv.devices[dev->port_number] = dev; in ps3_vuart_probe()
1060 mutex_unlock(&vuart_bus_priv.probe_mutex); in ps3_vuart_probe()
1069 vuart_bus_priv.devices[dev->port_number] = NULL; in ps3_vuart_probe()
1073 mutex_unlock(&vuart_bus_priv.probe_mutex); in ps3_vuart_probe()
1112 mutex_lock(&vuart_bus_priv.probe_mutex); in ps3_vuart_remove()
1120 mutex_unlock(&vuart_bus_priv.probe_mutex); in ps3_vuart_remove()
1138 vuart_bus_priv.devices[dev->port_number] = NULL; in ps3_vuart_remove()
1143 mutex_unlock(&vuart_bus_priv.probe_mutex); in ps3_vuart_remove()
1163 mutex_lock(&vuart_bus_priv.probe_mutex); in ps3_vuart_shutdown()
1171 mutex_unlock(&vuart_bus_priv.probe_mutex); in ps3_vuart_shutdown()
1195 mutex_unlock(&vuart_bus_priv.probe_mutex); in ps3_vuart_shutdown()
1206 mutex_init(&vuart_bus_priv.probe_mutex); in ps3_vuart_bus_init()