mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
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>
This commit is contained in:
parent
09d6029f43
commit
3ec6a8d02e
2 changed files with 4 additions and 3 deletions
|
@ -9,6 +9,8 @@
|
||||||
#ifndef _PORTDRV_H_
|
#ifndef _PORTDRV_H_
|
||||||
#define _PORTDRV_H_
|
#define _PORTDRV_H_
|
||||||
|
|
||||||
|
#include <linux/compiler.h>
|
||||||
|
|
||||||
#if !defined(PCI_CAP_ID_PME)
|
#if !defined(PCI_CAP_ID_PME)
|
||||||
#define PCI_CAP_ID_PME 1
|
#define PCI_CAP_ID_PME 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,7 +41,7 @@ extern int pcie_port_device_suspend(struct pci_dev *dev, pm_message_t state);
|
||||||
extern int pcie_port_device_resume(struct pci_dev *dev);
|
extern int pcie_port_device_resume(struct pci_dev *dev);
|
||||||
#endif
|
#endif
|
||||||
extern void pcie_port_device_remove(struct pci_dev *dev);
|
extern void pcie_port_device_remove(struct pci_dev *dev);
|
||||||
extern int pcie_port_bus_register(void);
|
extern int __must_check pcie_port_bus_register(void);
|
||||||
extern void pcie_port_bus_unregister(void);
|
extern void pcie_port_bus_unregister(void);
|
||||||
|
|
||||||
#endif /* _PORTDRV_H_ */
|
#endif /* _PORTDRV_H_ */
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
* Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com)
|
* Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/compiler.h>
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
@ -401,7 +400,7 @@ void pcie_port_device_remove(struct pci_dev *dev)
|
||||||
pci_disable_msi(dev);
|
pci_disable_msi(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
int __must_check pcie_port_bus_register(void)
|
int pcie_port_bus_register(void)
|
||||||
{
|
{
|
||||||
return bus_register(&pcie_port_bus_type);
|
return bus_register(&pcie_port_bus_type);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue