vuart_bus_priv
mutex_lock(&vuart_bus_priv.probe_mutex);
if (vuart_bus_priv.devices[dev->port_number]) {
vuart_bus_priv.devices[dev->port_number] = dev;
mutex_unlock(&vuart_bus_priv.probe_mutex);
vuart_bus_priv.devices[dev->port_number] = NULL;
mutex_unlock(&vuart_bus_priv.probe_mutex);
mutex_lock(&vuart_bus_priv.probe_mutex);
mutex_unlock(&vuart_bus_priv.probe_mutex);
vuart_bus_priv.devices[dev->port_number] = NULL;
mutex_unlock(&vuart_bus_priv.probe_mutex);
mutex_lock(&vuart_bus_priv.probe_mutex);
mutex_unlock(&vuart_bus_priv.probe_mutex);
mutex_unlock(&vuart_bus_priv.probe_mutex);
mutex_init(&vuart_bus_priv.probe_mutex);
} vuart_bus_priv;
struct vuart_bus_priv *bus_priv = _private;
vuart_bus_priv.use_count++;
BUG_ON(vuart_bus_priv.use_count > 2);
if (vuart_bus_priv.use_count != 1)
BUG_ON(vuart_bus_priv.bmp);
vuart_bus_priv.bmp = kzalloc_obj(struct ports_bmp);
if (!vuart_bus_priv.bmp) {
result = ps3_vuart_irq_setup(PS3_BINDING_CPU_ANY, vuart_bus_priv.bmp,
&vuart_bus_priv.virq);
result = request_irq(vuart_bus_priv.virq, ps3_vuart_irq_handler,
0, "vuart", &vuart_bus_priv);
ps3_vuart_irq_destroy(vuart_bus_priv.virq);
vuart_bus_priv.virq = 0;
kfree(vuart_bus_priv.bmp);
vuart_bus_priv.bmp = NULL;
vuart_bus_priv.use_count--;
vuart_bus_priv.use_count--;
BUG_ON(vuart_bus_priv.use_count < 0);
if (vuart_bus_priv.use_count != 0)
free_irq(vuart_bus_priv.virq, &vuart_bus_priv);
ps3_vuart_irq_destroy(vuart_bus_priv.virq);
vuart_bus_priv.virq = 0;
kfree(vuart_bus_priv.bmp);
vuart_bus_priv.bmp = NULL;