diff options
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 77baff022f71..00a9947cb7cc 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -715,7 +715,7 @@ static struct bin_attribute pci_config_attr = { | |||
715 | .name = "config", | 715 | .name = "config", |
716 | .mode = S_IRUGO | S_IWUSR, | 716 | .mode = S_IRUGO | S_IWUSR, |
717 | }, | 717 | }, |
718 | .size = 256, | 718 | .size = PCI_CFG_SPACE_SIZE, |
719 | .read = pci_read_config, | 719 | .read = pci_read_config, |
720 | .write = pci_write_config, | 720 | .write = pci_write_config, |
721 | }; | 721 | }; |
@@ -725,7 +725,7 @@ static struct bin_attribute pcie_config_attr = { | |||
725 | .name = "config", | 725 | .name = "config", |
726 | .mode = S_IRUGO | S_IWUSR, | 726 | .mode = S_IRUGO | S_IWUSR, |
727 | }, | 727 | }, |
728 | .size = 4096, | 728 | .size = PCI_CFG_SPACE_EXP_SIZE, |
729 | .read = pci_read_config, | 729 | .read = pci_read_config, |
730 | .write = pci_write_config, | 730 | .write = pci_write_config, |
731 | }; | 731 | }; |
@@ -743,7 +743,7 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) | |||
743 | if (!sysfs_initialized) | 743 | if (!sysfs_initialized) |
744 | return -EACCES; | 744 | return -EACCES; |
745 | 745 | ||
746 | if (pdev->cfg_size < 4096) | 746 | if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE) |
747 | retval = sysfs_create_bin_file(&pdev->dev.kobj, &pci_config_attr); | 747 | retval = sysfs_create_bin_file(&pdev->dev.kobj, &pci_config_attr); |
748 | else | 748 | else |
749 | retval = sysfs_create_bin_file(&pdev->dev.kobj, &pcie_config_attr); | 749 | retval = sysfs_create_bin_file(&pdev->dev.kobj, &pcie_config_attr); |
@@ -814,7 +814,7 @@ err_vpd: | |||
814 | kfree(pdev->vpd->attr); | 814 | kfree(pdev->vpd->attr); |
815 | } | 815 | } |
816 | err_config_file: | 816 | err_config_file: |
817 | if (pdev->cfg_size < 4096) | 817 | if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE) |
818 | sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); | 818 | sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); |
819 | else | 819 | else |
820 | sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr); | 820 | sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr); |
@@ -839,7 +839,7 @@ void pci_remove_sysfs_dev_files(struct pci_dev *pdev) | |||
839 | sysfs_remove_bin_file(&pdev->dev.kobj, pdev->vpd->attr); | 839 | sysfs_remove_bin_file(&pdev->dev.kobj, pdev->vpd->attr); |
840 | kfree(pdev->vpd->attr); | 840 | kfree(pdev->vpd->attr); |
841 | } | 841 | } |
842 | if (pdev->cfg_size < 4096) | 842 | if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE) |
843 | sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); | 843 | sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); |
844 | else | 844 | else |
845 | sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr); | 845 | sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr); |