Lines Matching refs:tmp

461 	struct parport *tmp;  in parport_register_port()  local
467 tmp = kzalloc(sizeof(struct parport), GFP_KERNEL); in parport_register_port()
468 if (!tmp) in parport_register_port()
472 tmp->base = base; in parport_register_port()
473 tmp->irq = irq; in parport_register_port()
474 tmp->dma = dma; in parport_register_port()
475 tmp->muxport = tmp->daisy = tmp->muxsel = -1; in parport_register_port()
476 tmp->modes = 0; in parport_register_port()
477 INIT_LIST_HEAD(&tmp->list); in parport_register_port()
478 tmp->devices = tmp->cad = NULL; in parport_register_port()
479 tmp->flags = 0; in parport_register_port()
480 tmp->ops = ops; in parport_register_port()
481 tmp->physport = tmp; in parport_register_port()
482 memset(tmp->probe_info, 0, 5 * sizeof(struct parport_device_info)); in parport_register_port()
483 rwlock_init(&tmp->cad_lock); in parport_register_port()
484 spin_lock_init(&tmp->waitlist_lock); in parport_register_port()
485 spin_lock_init(&tmp->pardevice_lock); in parport_register_port()
486 tmp->ieee1284.mode = IEEE1284_MODE_COMPAT; in parport_register_port()
487 tmp->ieee1284.phase = IEEE1284_PH_FWD_IDLE; in parport_register_port()
488 sema_init(&tmp->ieee1284.irq, 0); in parport_register_port()
489 tmp->spintime = parport_default_spintime; in parport_register_port()
490 atomic_set(&tmp->ref_count, 1); in parport_register_port()
491 INIT_LIST_HEAD(&tmp->full_list); in parport_register_port()
495 kfree(tmp); in parport_register_port()
506 tmp->portnum = tmp->number = num; in parport_register_port()
507 list_add_tail(&tmp->full_list, l); in parport_register_port()
513 sprintf(name, "parport%d", tmp->portnum = tmp->number); in parport_register_port()
514 tmp->name = name; in parport_register_port()
515 tmp->bus_dev.bus = &parport_bus_type; in parport_register_port()
516 tmp->bus_dev.release = free_port; in parport_register_port()
517 dev_set_name(&tmp->bus_dev, name); in parport_register_port()
518 tmp->bus_dev.type = &parport_device_type; in parport_register_port()
522 tmp->probe_info[device].class = PARPORT_CLASS_LEGACY; in parport_register_port()
524 tmp->waithead = tmp->waittail = NULL; in parport_register_port()
526 ret = device_register(&tmp->bus_dev); in parport_register_port()
528 put_device(&tmp->bus_dev); in parport_register_port()
532 return tmp; in parport_register_port()
720 struct pardevice *tmp; in parport_register_device() local
761 tmp = kmalloc(sizeof(struct pardevice), GFP_KERNEL); in parport_register_device()
762 if (!tmp) in parport_register_device()
765 tmp->state = kmalloc(sizeof(struct parport_state), GFP_KERNEL); in parport_register_device()
766 if (!tmp->state) in parport_register_device()
769 tmp->name = name; in parport_register_device()
770 tmp->port = port; in parport_register_device()
771 tmp->daisy = -1; in parport_register_device()
772 tmp->preempt = pf; in parport_register_device()
773 tmp->wakeup = kf; in parport_register_device()
774 tmp->private = handle; in parport_register_device()
775 tmp->flags = flags; in parport_register_device()
776 tmp->irq_func = irq_func; in parport_register_device()
777 tmp->waiting = 0; in parport_register_device()
778 tmp->timeout = 5 * HZ; in parport_register_device()
779 tmp->devmodel = false; in parport_register_device()
782 tmp->prev = NULL; in parport_register_device()
800 tmp->next = port->physport->devices; in parport_register_device()
807 port->physport->devices->prev = tmp; in parport_register_device()
808 port->physport->devices = tmp; in parport_register_device()
811 init_waitqueue_head(&tmp->wait_q); in parport_register_device()
812 tmp->timeslice = parport_default_timeslice; in parport_register_device()
813 tmp->waitnext = tmp->waitprev = NULL; in parport_register_device()
819 port->ops->init_state(tmp, tmp->state); in parport_register_device()
821 port->proc_device = tmp; in parport_register_device()
822 parport_device_proc_register(tmp); in parport_register_device()
824 return tmp; in parport_register_device()
827 kfree(tmp->state); in parport_register_device()
829 kfree(tmp); in parport_register_device()