Lines Matching refs:pdev
43 static int hsu_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) in hsu_pci_probe() argument
48 ret = pcim_enable_device(pdev); in hsu_pci_probe()
52 ret = pcim_iomap_regions(pdev, BIT(0), pci_name(pdev)); in hsu_pci_probe()
54 dev_err(&pdev->dev, "I/O memory remapping failed\n"); in hsu_pci_probe()
58 pci_set_master(pdev); in hsu_pci_probe()
59 pci_try_set_mwi(pdev); in hsu_pci_probe()
61 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); in hsu_pci_probe()
65 ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); in hsu_pci_probe()
69 chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL); in hsu_pci_probe()
73 chip->dev = &pdev->dev; in hsu_pci_probe()
74 chip->regs = pcim_iomap_table(pdev)[0]; in hsu_pci_probe()
75 chip->length = pci_resource_len(pdev, 0); in hsu_pci_probe()
77 chip->irq = pdev->irq; in hsu_pci_probe()
79 pci_enable_msi(pdev); in hsu_pci_probe()
89 pci_set_drvdata(pdev, chip); in hsu_pci_probe()
98 static void hsu_pci_remove(struct pci_dev *pdev) in hsu_pci_remove() argument
100 struct hsu_dma_chip *chip = pci_get_drvdata(pdev); in hsu_pci_remove()