diff options
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 177a50ff6454..393cf095a0c4 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -3748,18 +3748,6 @@ resource_size_t pci_specified_resource_alignment(struct pci_dev *dev) | |||
3748 | return align; | 3748 | return align; |
3749 | } | 3749 | } |
3750 | 3750 | ||
3751 | /** | ||
3752 | * pci_is_reassigndev - check if specified PCI is target device to reassign | ||
3753 | * @dev: the PCI device to check | ||
3754 | * | ||
3755 | * RETURNS: non-zero for PCI device is a target device to reassign, | ||
3756 | * or zero is not. | ||
3757 | */ | ||
3758 | int pci_is_reassigndev(struct pci_dev *dev) | ||
3759 | { | ||
3760 | return (pci_specified_resource_alignment(dev) != 0); | ||
3761 | } | ||
3762 | |||
3763 | /* | 3751 | /* |
3764 | * This function disables memory decoding and releases memory resources | 3752 | * This function disables memory decoding and releases memory resources |
3765 | * of the device specified by kernel's boot parameter 'pci=resource_alignment='. | 3753 | * of the device specified by kernel's boot parameter 'pci=resource_alignment='. |
@@ -3774,7 +3762,9 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev) | |||
3774 | resource_size_t align, size; | 3762 | resource_size_t align, size; |
3775 | u16 command; | 3763 | u16 command; |
3776 | 3764 | ||
3777 | if (!pci_is_reassigndev(dev)) | 3765 | /* check if specified PCI is target device to reassign */ |
3766 | align = pci_specified_resource_alignment(dev); | ||
3767 | if (!align) | ||
3778 | return; | 3768 | return; |
3779 | 3769 | ||
3780 | if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL && | 3770 | if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL && |
@@ -3790,7 +3780,6 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev) | |||
3790 | command &= ~PCI_COMMAND_MEMORY; | 3780 | command &= ~PCI_COMMAND_MEMORY; |
3791 | pci_write_config_word(dev, PCI_COMMAND, command); | 3781 | pci_write_config_word(dev, PCI_COMMAND, command); |
3792 | 3782 | ||
3793 | align = pci_specified_resource_alignment(dev); | ||
3794 | for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) { | 3783 | for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) { |
3795 | r = &dev->resource[i]; | 3784 | r = &dev->resource[i]; |
3796 | if (!(r->flags & IORESOURCE_MEM)) | 3785 | if (!(r->flags & IORESOURCE_MEM)) |