diff options
author | Joe Perches <joe@perches.com> | 2012-04-03 16:14:31 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-05 04:32:14 +0400 |
commit | 044a38134a1536536cc4e542ec31a86ef8e294c9 (patch) | |
tree | f05fd823f50836290e6022cda7c7e91458ecd92f /drivers/net/ethernet/neterion/vxge/vxge-main.h | |
parent | 01d7f30a9f962573b6c91ed520c73fb30658d826 (diff) | |
download | linux-044a38134a1536536cc4e542ec31a86ef8e294c9.tar.xz |
vxge: Convert macro to inline function
Convert the macro to inline function to check the arguments.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/neterion/vxge/vxge-main.h')
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-main.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.h b/drivers/net/ethernet/neterion/vxge/vxge-main.h index 372406cea25d..35f3e7552ec2 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.h +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.h @@ -416,12 +416,15 @@ struct vxge_tx_priv { static int p = val; \ module_param(p, int, 0) -#define vxge_os_timer(timer, handle, arg, exp) do { \ - init_timer(&timer); \ - timer.function = handle; \ - timer.data = (unsigned long) arg; \ - mod_timer(&timer, (jiffies + exp)); \ - } while (0) +static inline +void vxge_os_timer(struct timer_list *timer, void (*func)(unsigned long data), + struct vxgedev *vdev, unsigned long timeout) +{ + init_timer(timer); + timer->function = func; + timer->data = (unsigned long)vdev; + mod_timer(timer, jiffies + timeout); +} void vxge_initialize_ethtool_ops(struct net_device *ndev); enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev); |