diff options
author | Andrew Morton <akpm@osdl.org> | 2006-09-25 19:52:20 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-10-18 14:36:10 -0400 |
commit | 3ec6a8d02efd54a66640bd85afa8c162647b56c3 (patch) | |
tree | 7944d301ea555afeca4a18048135c6787e7185fc /drivers/pci | |
parent | 09d6029f43ebbe7307854abdae204c25d711ff94 (diff) |
PCI: pcie-check-and-return-bus_register-errors fix
__must_check goes on the declaration, not the definition.
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/portdrv.h | 4 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h index 67fcd176babd..3656e0349dd1 100644 --- a/drivers/pci/pcie/portdrv.h +++ b/drivers/pci/pcie/portdrv.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef _PORTDRV_H_ | 9 | #ifndef _PORTDRV_H_ |
10 | #define _PORTDRV_H_ | 10 | #define _PORTDRV_H_ |
11 | 11 | ||
12 | #include <linux/compiler.h> | ||
13 | |||
12 | #if !defined(PCI_CAP_ID_PME) | 14 | #if !defined(PCI_CAP_ID_PME) |
13 | #define PCI_CAP_ID_PME 1 | 15 | #define PCI_CAP_ID_PME 1 |
14 | #endif | 16 | #endif |
@@ -39,7 +41,7 @@ extern int pcie_port_device_suspend(struct pci_dev *dev, pm_message_t state); | |||
39 | extern int pcie_port_device_resume(struct pci_dev *dev); | 41 | extern int pcie_port_device_resume(struct pci_dev *dev); |
40 | #endif | 42 | #endif |
41 | extern void pcie_port_device_remove(struct pci_dev *dev); | 43 | extern void pcie_port_device_remove(struct pci_dev *dev); |
42 | extern int pcie_port_bus_register(void); | 44 | extern int __must_check pcie_port_bus_register(void); |
43 | extern void pcie_port_bus_unregister(void); | 45 | extern void pcie_port_bus_unregister(void); |
44 | 46 | ||
45 | #endif /* _PORTDRV_H_ */ | 47 | #endif /* _PORTDRV_H_ */ |
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index bd6615b4d40e..b20a9b81dae2 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) | 6 | * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/compiler.h> | ||
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
11 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
@@ -401,7 +400,7 @@ void pcie_port_device_remove(struct pci_dev *dev) | |||
401 | pci_disable_msi(dev); | 400 | pci_disable_msi(dev); |
402 | } | 401 | } |
403 | 402 | ||
404 | int __must_check pcie_port_bus_register(void) | 403 | int pcie_port_bus_register(void) |
405 | { | 404 | { |
406 | return bus_register(&pcie_port_bus_type); | 405 | return bus_register(&pcie_port_bus_type); |
407 | } | 406 | } |