From 956a206620fa048afdcd8ab714ac3cf6a9e884b7 Mon Sep 17 00:00:00 2001 From: stephen hemminger Date: Fri, 16 Sep 2011 11:10:01 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/ethernet/neterion/vxge/vxge-main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'drivers/net/ethernet/neterion/vxge/vxge-main.c') 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) { -- cgit v1.2.3