From 4e4d035a928340e828f633059b735901584c67a7 Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Tue, 16 Apr 2013 14:20:15 +0200 Subject: [PATCH] s390/pci: remove disable_device implementation pci_disable_device is called by a driver after it stops using the pci function - e.g. during the removal of the driver. The current implementation removes the architecture specific information of this function such that even after a call to pci_enable_device the pci function is no longer usable. Just remove pcibios_disable_device. Reviewed-by: Gerald Schaefer Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- arch/s390/pci/pci.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index dd8e13ef506c..48de2be7b46a 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -600,19 +600,6 @@ static void zpci_map_resources(struct zpci_dev *zdev) } }; -static void zpci_unmap_resources(struct pci_dev *pdev) -{ - resource_size_t len; - int i; - - for (i = 0; i < PCI_BAR_COUNT; i++) { - len = pci_resource_len(pdev, i); - if (!len) - continue; - pci_iounmap(pdev, (void *) pdev->resource[i].start); - } -}; - struct zpci_dev *zpci_alloc_device(void) { struct zpci_dev *zdev; @@ -640,21 +627,6 @@ void zpci_free_device(struct zpci_dev *zdev) kfree(zdev); } -/* Called on removal of pci_dev, leaves zpci and bus device */ -static void zpci_remove_device(struct pci_dev *pdev) -{ - struct zpci_dev *zdev = get_zdev(pdev); - - dev_info(&pdev->dev, "Removing device %u\n", zdev->domain); - zdev->state = ZPCI_FN_STATE_CONFIGURED; - zpci_dma_exit_device(zdev); - zpci_fmb_disable_device(zdev); - zpci_sysfs_remove_device(&pdev->dev); - zpci_unmap_resources(pdev); - list_del(&zdev->entry); /* can be called from init */ - zdev->pdev = NULL; -} - static void zpci_scan_devices(void) { struct zpci_dev *zdev; @@ -692,12 +664,6 @@ int pcibios_enable_device(struct pci_dev *pdev, int mask) return 0; } -void pcibios_disable_device(struct pci_dev *pdev) -{ - zpci_remove_device(pdev); - pdev->sysdata = NULL; -} - int pcibios_add_platform_entries(struct pci_dev *pdev) { return zpci_sysfs_add_device(&pdev->dev); -- 2.39.5