Lines Matching defs:vuart_bus_priv

861 static struct vuart_bus_priv {
867 } vuart_bus_priv;
879 struct vuart_bus_priv *bus_priv = _private;
908 vuart_bus_priv.use_count++;
910 BUG_ON(vuart_bus_priv.use_count > 2);
912 if (vuart_bus_priv.use_count != 1)
915 BUG_ON(vuart_bus_priv.bmp);
917 vuart_bus_priv.bmp = kzalloc(sizeof(struct ports_bmp), GFP_KERNEL);
919 if (!vuart_bus_priv.bmp) {
924 result = ps3_vuart_irq_setup(PS3_BINDING_CPU_ANY, vuart_bus_priv.bmp,
925 &vuart_bus_priv.virq);
934 result = request_irq(vuart_bus_priv.virq, ps3_vuart_irq_handler,
935 0, "vuart", &vuart_bus_priv);
947 ps3_vuart_irq_destroy(vuart_bus_priv.virq);
948 vuart_bus_priv.virq = 0;
950 kfree(vuart_bus_priv.bmp);
951 vuart_bus_priv.bmp = NULL;
953 vuart_bus_priv.use_count--;
962 vuart_bus_priv.use_count--;
964 BUG_ON(vuart_bus_priv.use_count < 0);
966 if (vuart_bus_priv.use_count != 0)
969 free_irq(vuart_bus_priv.virq, &vuart_bus_priv);
971 ps3_vuart_irq_destroy(vuart_bus_priv.virq);
972 vuart_bus_priv.virq = 0;
974 kfree(vuart_bus_priv.bmp);
975 vuart_bus_priv.bmp = NULL;
1000 mutex_lock(&vuart_bus_priv.probe_mutex);
1007 if (vuart_bus_priv.devices[dev->port_number]) {
1014 vuart_bus_priv.devices[dev->port_number] = dev;
1060 mutex_unlock(&vuart_bus_priv.probe_mutex);
1069 vuart_bus_priv.devices[dev->port_number] = NULL;
1073 mutex_unlock(&vuart_bus_priv.probe_mutex);
1083 * vuart_bus_priv.probe_mutex held. Used by ps3_vuart_remove and
1112 mutex_lock(&vuart_bus_priv.probe_mutex);
1120 mutex_unlock(&vuart_bus_priv.probe_mutex);
1138 vuart_bus_priv.devices[dev->port_number] = NULL;
1143 mutex_unlock(&vuart_bus_priv.probe_mutex);
1162 mutex_lock(&vuart_bus_priv.probe_mutex);
1170 mutex_unlock(&vuart_bus_priv.probe_mutex);
1194 mutex_unlock(&vuart_bus_priv.probe_mutex);
1204 mutex_init(&vuart_bus_priv.probe_mutex);