node-drivers/base-driver/drivers/vca/plx87xx/plx_main.c
static int plx_pci_device_init(struct pci_dev *pdev)
{
	int rc = pci_enable_device(pdev);
	if (rc) {
		dev_err(&pdev->dev, "failed to enable pci device.\n");
		goto finish;
	}

	pci_set_master(pdev);

	rc = pci_request_regions(pdev, plx_driver_name);
	if (rc) {
		dev_err(&pdev->dev, "failed to get pci regions.\n");
		goto disable_device;
	}

	rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
	if (rc) {
		dev_err(&pdev->dev, "Cannot set DMA mask\n");
		goto release_regions;
	}
	goto finish;

release_regions:
	pci_release_regions(pdev);
disable_device:
	pci_disable_device(pdev);
finish:
	return rc;
}
/**
 * plx_pci_device_init - Init pci device for plx device
 * @pdev: PCI device structure
 * returns 0 on success, < 0 on failure.
 */
Init pci device for plx device
@pdev: PCI device structure
returns 0 on success, < 0 on failure.
Init pci device for plx device @pdev : PCI device structure returns 0 on success < 0 on failure .
static int plx_pci_device_init(struct pci_dev *pdev)
{
	int rc = pci_enable_device(pdev);
	if (rc) {
		dev_err(&pdev->dev, "failed to enable pci device.\n");
		goto finish;
	}
	pci_set_master(pdev);
	rc = pci_request_regions(pdev, plx_driver_name);
	if (rc) {
		dev_err(&pdev->dev, "failed to get pci regions.\n");
		goto disable_device;
	}
	rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
	if (rc) {
		dev_err(&pdev->dev, "Cannot set DMA mask\n");
		goto release_regions;
	}
	goto finish;
release_regions:
	pci_release_regions(pdev);
disable_device:
	pci_disable_device(pdev);
finish:
	return rc;
}
static int plx_pci_device_init ( struct pci_dev * pdev ) { int rc = pci_enable_device ( pdev ) ; if ( rc ) { dev_err ( & pdev -> dev , " \n " ) ; goto finish ; } pci_set_master ( pdev ) ; rc = pci_request_regions ( pdev , plx_driver_name ) ; if ( rc ) { dev_err ( & pdev -> dev , " \n " ) ; goto disable_device ; } rc = pci_set_dma_mask ( pdev , DMA_BIT_MASK ( 64 ) ) ; if ( rc ) { dev_err ( & pdev -> dev , " \n " ) ; goto release_regions ; } goto finish ; release_regions : pci_release_regions ( pdev ) ; disable_device : pci_disable_device ( pdev ) ; finish : return rc ; }
plx_pci_device_init - Init pci device for plx device
 @pdev: PCI device structure
 returns 0 on success, < 0 on failure.
plx_pci_device_init - Init pci device for plx device @pdev : PCI device structure returns 0 on success < 0 on failure .