Commit ebd77feb authored by Phong Tran's avatar Phong Tran Committed by Kalle Valo

ipw2x00: Fix -Wcast-function-type

correct usage prototype of callback in tasklet_init().
Report by https://github.com/KSPP/linux/issues/20Signed-off-by: default avatarPhong Tran <tranmanphong@gmail.com>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 475eec11
...@@ -3206,8 +3206,9 @@ static void ipw2100_tx_send_data(struct ipw2100_priv *priv) ...@@ -3206,8 +3206,9 @@ static void ipw2100_tx_send_data(struct ipw2100_priv *priv)
} }
} }
static void ipw2100_irq_tasklet(struct ipw2100_priv *priv) static void ipw2100_irq_tasklet(unsigned long data)
{ {
struct ipw2100_priv *priv = (struct ipw2100_priv *)data;
struct net_device *dev = priv->net_dev; struct net_device *dev = priv->net_dev;
unsigned long flags; unsigned long flags;
u32 inta, tmp; u32 inta, tmp;
...@@ -6006,7 +6007,7 @@ static void ipw2100_rf_kill(struct work_struct *work) ...@@ -6006,7 +6007,7 @@ static void ipw2100_rf_kill(struct work_struct *work)
spin_unlock_irqrestore(&priv->low_lock, flags); spin_unlock_irqrestore(&priv->low_lock, flags);
} }
static void ipw2100_irq_tasklet(struct ipw2100_priv *priv); static void ipw2100_irq_tasklet(unsigned long data);
static const struct net_device_ops ipw2100_netdev_ops = { static const struct net_device_ops ipw2100_netdev_ops = {
.ndo_open = ipw2100_open, .ndo_open = ipw2100_open,
...@@ -6136,7 +6137,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, ...@@ -6136,7 +6137,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill); INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill);
INIT_DELAYED_WORK(&priv->scan_event, ipw2100_scan_event); INIT_DELAYED_WORK(&priv->scan_event, ipw2100_scan_event);
tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) tasklet_init(&priv->irq_tasklet,
ipw2100_irq_tasklet, (unsigned long)priv); ipw2100_irq_tasklet, (unsigned long)priv);
/* NOTE: We do not start the deferred work for status checks yet */ /* NOTE: We do not start the deferred work for status checks yet */
......
...@@ -1945,8 +1945,9 @@ static void notify_wx_assoc_event(struct ipw_priv *priv) ...@@ -1945,8 +1945,9 @@ static void notify_wx_assoc_event(struct ipw_priv *priv)
wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL); wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL);
} }
static void ipw_irq_tasklet(struct ipw_priv *priv) static void ipw_irq_tasklet(unsigned long data)
{ {
struct ipw_priv *priv = (struct ipw_priv *)data;
u32 inta, inta_mask, handled = 0; u32 inta, inta_mask, handled = 0;
unsigned long flags; unsigned long flags;
int rc = 0; int rc = 0;
...@@ -10677,7 +10678,7 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv) ...@@ -10677,7 +10678,7 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv)
INIT_WORK(&priv->qos_activate, ipw_bg_qos_activate); INIT_WORK(&priv->qos_activate, ipw_bg_qos_activate);
#endif /* CONFIG_IPW2200_QOS */ #endif /* CONFIG_IPW2200_QOS */
tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) tasklet_init(&priv->irq_tasklet,
ipw_irq_tasklet, (unsigned long)priv); ipw_irq_tasklet, (unsigned long)priv);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment