diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2010-04-15 13:10:03 +0900 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-05-11 12:01:13 -0700 |
commit | 460d298d521910483dcdc09920ca4c4a63b16730 (patch) | |
tree | 271ff70a7fa27992055de90da9dfeefd7ea5d0f4 /drivers/pci/pcie/aer/aerdrv_core.c | |
parent | c6d34eddecb34fd84f9fb2ea26a63cfde5662f49 (diff) | |
download | blackbird-obmc-linux-460d298d521910483dcdc09920ca4c4a63b16730.tar.gz blackbird-obmc-linux-460d298d521910483dcdc09920ca4c4a63b16730.zip |
PCI: aerdrv: cleanup inconsistent functions
This cleanup solves some minor naming issues by removing unuseful
function aer_delete_rootport() and by renaming disable_root_aer()
to aer_disable_rootport().
- Inconsistent location of alloc & free:
The struct rpc is allocated in aer_alloc_rpc() at aerdrv.c
while it is implicitly freed in aer_delete_rootport() at
aerdrv_core.c.
- Inconsistent function name:
It makes a bit confusion that aer_delete_rootport() is seemed
to be paired with aer_enable_rootport(), i.e. there is neither
"add" against "delete" nor "disable" against "enable".
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pcie/aer/aerdrv_core.c')
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_core.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 9754a09bf20e..0dcbae126834 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c @@ -629,12 +629,12 @@ void aer_enable_rootport(struct aer_rpc *rpc) } /** - * disable_root_aer - disable Root Port's interrupts when receiving messages + * aer_disable_rootport - disable Root Port's interrupts when receiving messages * @rpc: pointer to a Root Port data structure * * Invoked when PCIe bus unloads AER service driver. */ -static void disable_root_aer(struct aer_rpc *rpc) +void aer_disable_rootport(struct aer_rpc *rpc) { struct pci_dev *pdev = rpc->rpd->port; u32 reg32; @@ -840,20 +840,6 @@ void aer_isr(struct work_struct *work) } /** - * aer_delete_rootport - disable root port aer and delete service data - * @rpc: pointer to a root port device being deleted - * - * Invoked when AER service unloaded on a specific Root Port - */ -void aer_delete_rootport(struct aer_rpc *rpc) -{ - /* Disable root port AER itself */ - disable_root_aer(rpc); - - kfree(rpc); -} - -/** * aer_init - provide AER initialization * @dev: pointer to AER pcie device * |