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>
Este commit está contenido en:
stephen hemminger
2011-09-16 11:10:01 +00:00
cometido por David S. Miller
padre d91d25d537
commit 956a206620
Se han modificado 4 ficheros con 20 adiciones y 17 borrados

Ver fichero

@@ -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) {