Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36064
b: refs/heads/master
c: 20d5166
h: refs/heads/master
v: v3
  • Loading branch information
Randy Dunlap authored and Greg Kroah-Hartman committed Sep 27, 2006
1 parent 0fd5b56 commit 586cdb9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6397c75cbc4d7dbc3d07278b57c82a47dafb21b5
refs/heads/master: 20d516602c022997feb24a9f1a806fc986b9e4e8
2 changes: 1 addition & 1 deletion trunk/drivers/pci/pcie/portdrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,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);
#endif
extern void pcie_port_device_remove(struct pci_dev *dev);
extern void pcie_port_bus_register(void);
extern int pcie_port_bus_register(void);
extern void pcie_port_bus_unregister(void);

#endif /* _PORTDRV_H_ */
5 changes: 3 additions & 2 deletions trunk/drivers/pci/pcie/portdrv_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com)
*/

#include <linux/compiler.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/kernel.h>
Expand Down Expand Up @@ -402,9 +403,9 @@ void pcie_port_device_remove(struct pci_dev *dev)
pci_disable_msi(dev);
}

void pcie_port_bus_register(void)
int __must_check pcie_port_bus_register(void)
{
bus_register(&pcie_port_bus_type);
return bus_register(&pcie_port_bus_type);
}

void pcie_port_bus_unregister(void)
Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/pci/pcie/portdrv_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,17 @@ static struct pci_driver pcie_portdrv = {

static int __init pcie_portdrv_init(void)
{
int retval = 0;
int retval;

pcie_port_bus_register();
retval = pcie_port_bus_register();
if (retval) {
printk(KERN_WARNING "PCIE: bus_register error: %d\n", retval);
goto out;
}
retval = pci_register_driver(&pcie_portdrv);
if (retval)
pcie_port_bus_unregister();
out:
return retval;
}

Expand Down

0 comments on commit 586cdb9

Please sign in to comment.