Lines Matching refs:par_dev

123 		struct pardevice *par_dev = to_pardevice(dev);  in parport_probe()  local
125 if (strcmp(par_dev->name, drv->name)) in parport_probe()
624 struct pardevice *par_dev = to_pardevice(dev); in free_pardevice() local
626 kfree(par_dev->name); in free_pardevice()
627 kfree(par_dev); in free_pardevice()
696 struct pardevice *par_dev; in parport_register_dev_model() local
733 par_dev = kzalloc(sizeof(*par_dev), GFP_KERNEL); in parport_register_dev_model()
734 if (!par_dev) in parport_register_dev_model()
737 par_dev->state = kzalloc(sizeof(*par_dev->state), GFP_KERNEL); in parport_register_dev_model()
738 if (!par_dev->state) in parport_register_dev_model()
745 par_dev->name = devname; in parport_register_dev_model()
746 par_dev->port = port; in parport_register_dev_model()
747 par_dev->daisy = -1; in parport_register_dev_model()
748 par_dev->preempt = par_dev_cb->preempt; in parport_register_dev_model()
749 par_dev->wakeup = par_dev_cb->wakeup; in parport_register_dev_model()
750 par_dev->private = par_dev_cb->private; in parport_register_dev_model()
751 par_dev->flags = par_dev_cb->flags; in parport_register_dev_model()
752 par_dev->irq_func = par_dev_cb->irq_func; in parport_register_dev_model()
753 par_dev->waiting = 0; in parport_register_dev_model()
754 par_dev->timeout = 5 * HZ; in parport_register_dev_model()
756 par_dev->dev.parent = &port->bus_dev; in parport_register_dev_model()
757 par_dev->dev.bus = &parport_bus_type; in parport_register_dev_model()
758 ret = dev_set_name(&par_dev->dev, "%s.%d", devname, id); in parport_register_dev_model()
761 par_dev->dev.release = free_pardevice; in parport_register_dev_model()
762 par_dev->devmodel = true; in parport_register_dev_model()
763 ret = device_register(&par_dev->dev); in parport_register_dev_model()
765 kfree(par_dev->state); in parport_register_dev_model()
766 put_device(&par_dev->dev); in parport_register_dev_model()
771 par_dev->prev = NULL; in parport_register_dev_model()
783 kfree(par_dev->state); in parport_register_dev_model()
784 device_unregister(&par_dev->dev); in parport_register_dev_model()
790 par_dev->next = port->physport->devices; in parport_register_dev_model()
797 port->physport->devices->prev = par_dev; in parport_register_dev_model()
798 port->physport->devices = par_dev; in parport_register_dev_model()
801 init_waitqueue_head(&par_dev->wait_q); in parport_register_dev_model()
802 par_dev->timeslice = parport_default_timeslice; in parport_register_dev_model()
803 par_dev->waitnext = NULL; in parport_register_dev_model()
804 par_dev->waitprev = NULL; in parport_register_dev_model()
810 port->ops->init_state(par_dev, par_dev->state); in parport_register_dev_model()
812 port->proc_device = par_dev; in parport_register_dev_model()
813 parport_device_proc_register(par_dev); in parport_register_dev_model()
816 return par_dev; in parport_register_dev_model()
821 kfree(par_dev->state); in parport_register_dev_model()
823 if (!par_dev->devmodel) in parport_register_dev_model()
824 kfree(par_dev); in parport_register_dev_model()