Searched refs:pht (Results 1 - 1 of 1) sorted by relevance
/linux-4.1.27/drivers/misc/ |
H A D | phantom.c | 341 struct phantom_device *pht; phantom_probe() local 367 pht = kzalloc(sizeof(*pht), GFP_KERNEL); phantom_probe() 368 if (pht == NULL) { phantom_probe() 373 pht->caddr = pci_iomap(pdev, 0, 0); phantom_probe() 374 if (pht->caddr == NULL) { phantom_probe() 378 pht->iaddr = pci_iomap(pdev, 2, 0); phantom_probe() 379 if (pht->iaddr == NULL) { phantom_probe() 383 pht->oaddr = pci_iomap(pdev, 3, 0); phantom_probe() 384 if (pht->oaddr == NULL) { phantom_probe() 389 mutex_init(&pht->open_lock); phantom_probe() 390 spin_lock_init(&pht->regs_lock); phantom_probe() 391 init_waitqueue_head(&pht->wait); phantom_probe() 392 cdev_init(&pht->cdev, &phantom_file_ops); phantom_probe() 393 pht->cdev.owner = THIS_MODULE; phantom_probe() 395 iowrite32(0, pht->caddr + PHN_IRQCTL); phantom_probe() 396 ioread32(pht->caddr + PHN_IRQCTL); /* PCI posting */ phantom_probe() 398 IRQF_SHARED, "phantom", pht); phantom_probe() 404 retval = cdev_add(&pht->cdev, MKDEV(phantom_major, minor), 1); phantom_probe() 415 pci_set_drvdata(pdev, pht); phantom_probe() 419 free_irq(pdev->irq, pht); phantom_probe() 421 pci_iounmap(pdev, pht->oaddr); phantom_probe() 423 pci_iounmap(pdev, pht->iaddr); phantom_probe() 425 pci_iounmap(pdev, pht->caddr); phantom_probe() 427 kfree(pht); phantom_probe() 440 struct phantom_device *pht = pci_get_drvdata(pdev); phantom_remove() local 441 unsigned int minor = MINOR(pht->cdev.dev); phantom_remove() 445 cdev_del(&pht->cdev); phantom_remove() 447 iowrite32(0, pht->caddr + PHN_IRQCTL); phantom_remove() 448 ioread32(pht->caddr + PHN_IRQCTL); /* PCI posting */ phantom_remove() 449 free_irq(pdev->irq, pht); phantom_remove() 451 pci_iounmap(pdev, pht->oaddr); phantom_remove() 452 pci_iounmap(pdev, pht->iaddr); phantom_remove() 453 pci_iounmap(pdev, pht->caddr); phantom_remove() 455 kfree(pht); phantom_remove()
|
Completed in 51 milliseconds