diff options
author | Jon Mason <jon.mason@exar.com> | 2010-11-30 18:43:26 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-12-23 15:53:09 -0500 |
commit | 1d3c16a818e992c199844954d95c17fd7ce6cbba (patch) | |
tree | 6f54b4153b8f7e54bdb5a8abc3ceffa7b4eec0e2 /drivers/pci/pci.c | |
parent | 2f671e2dbff6eb5ef4e2600adbec550c13b8fe72 (diff) |
PCI: make pci_restore_state return void
pci_restore_state only ever returns 0, thus there is no benefit in
having it return any value. Also, a large majority of the callers do
not check the return code of pci_restore_state. Make the
pci_restore_state a void return and avoid the overhead.
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 710c8a29be0d..6762dcae90ab 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -937,14 +937,13 @@ pci_save_state(struct pci_dev *dev) | |||
937 | * pci_restore_state - Restore the saved state of a PCI device | 937 | * pci_restore_state - Restore the saved state of a PCI device |
938 | * @dev: - PCI device that we're dealing with | 938 | * @dev: - PCI device that we're dealing with |
939 | */ | 939 | */ |
940 | int | 940 | void pci_restore_state(struct pci_dev *dev) |
941 | pci_restore_state(struct pci_dev *dev) | ||
942 | { | 941 | { |
943 | int i; | 942 | int i; |
944 | u32 val; | 943 | u32 val; |
945 | 944 | ||
946 | if (!dev->state_saved) | 945 | if (!dev->state_saved) |
947 | return 0; | 946 | return; |
948 | 947 | ||
949 | /* PCI Express register must be restored first */ | 948 | /* PCI Express register must be restored first */ |
950 | pci_restore_pcie_state(dev); | 949 | pci_restore_pcie_state(dev); |
@@ -968,8 +967,6 @@ pci_restore_state(struct pci_dev *dev) | |||
968 | pci_restore_iov_state(dev); | 967 | pci_restore_iov_state(dev); |
969 | 968 | ||
970 | dev->state_saved = false; | 969 | dev->state_saved = false; |
971 | |||
972 | return 0; | ||
973 | } | 970 | } |
974 | 971 | ||
975 | static int do_pci_enable_device(struct pci_dev *dev, int bars) | 972 | static int do_pci_enable_device(struct pci_dev *dev, int bars) |