diff options
author | stephen hemminger <shemminger@vyatta.com> | 2011-09-16 11:10:01 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-09-16 19:20:20 -0400 |
commit | 956a206620fa048afdcd8ab714ac3cf6a9e884b7 (patch) | |
tree | 5eeddd3697ca86c53b79bdfea0b81f6b1168a275 /drivers/net/ethernet/neterion/vxge/vxge-main.c | |
parent | d91d25d537af07ba71ed9751d5319daa8eee5066 (diff) | |
download | linux-956a206620fa048afdcd8ab714ac3cf6a9e884b7.tar.bz2 |
vxge: make function table const
All tables of function pointers should be const.
The pre-existing code has lots of needless indirection...
Inspired by similar change in PAX.
Compile tested only.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/neterion/vxge/vxge-main.c')
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-main.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c index 1a53a24fe3d4..ef1ba204bc59 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c @@ -4284,6 +4284,12 @@ static int __devinit is_sriov_initialized(struct pci_dev *pdev) return 0; } +static const struct vxge_hw_uld_cbs vxge_callbacks = { + .link_up = vxge_callback_link_up, + .link_down = vxge_callback_link_down, + .crit_err = vxge_callback_crit_err, +}; + /** * vxge_probe * @pdev : structure containing the PCI related information of the device. @@ -4494,9 +4500,7 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre) } /* Setting driver callbacks */ - attr.uld_callbacks.link_up = vxge_callback_link_up; - attr.uld_callbacks.link_down = vxge_callback_link_down; - attr.uld_callbacks.crit_err = vxge_callback_crit_err; + attr.uld_callbacks = &vxge_callbacks; status = vxge_hw_device_initialize(&hldev, &attr, device_config); if (status != VXGE_HW_OK) { |