Commit 321dabdc authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: move tasklet_struct to ks_wlan_private

Currently a pointer to the tasklet_struct used for bottom half
processing on the receive path is within the hw_info_t structure. This
structure is then embedded in the device private data
structure. Having the tasklet_struct nested does not add meaning to
the device private data, device private data already (and typically)
has various data relating to the device, there is no real need to
separate the tasklet_struct to a SDIO specific structure. While not
adding allot of extra meaning having the nested structure means the
programmer must open two header files to read the description of the
device private data, the code would be easier to read if the device
private data struct description was not spread over two files.

Move tasklet_struct out of sdio header file and into the device
private data structure description.
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 07e483c1
...@@ -380,7 +380,7 @@ static void rx_event_task(unsigned long dev) ...@@ -380,7 +380,7 @@ static void rx_event_task(unsigned long dev)
inc_rxqhead(priv); inc_rxqhead(priv);
if (cnt_rxqbody(priv) > 0) if (cnt_rxqbody(priv) > 0)
tasklet_schedule(&priv->ks_wlan_hw.rx_bh_task); tasklet_schedule(&priv->rx_bh_task);
} }
} }
...@@ -447,8 +447,7 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size) ...@@ -447,8 +447,7 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size)
} }
} }
/* rx_event_task((void *)priv); */ tasklet_schedule(&priv->rx_bh_task);
tasklet_schedule(&priv->ks_wlan_hw.rx_bh_task);
} }
static void ks7010_rw_function(struct work_struct *work) static void ks7010_rw_function(struct work_struct *work)
...@@ -614,8 +613,7 @@ static int trx_device_init(struct ks_wlan_private *priv) ...@@ -614,8 +613,7 @@ static int trx_device_init(struct ks_wlan_private *priv)
spin_lock_init(&priv->tx_dev.tx_dev_lock); spin_lock_init(&priv->tx_dev.tx_dev_lock);
spin_lock_init(&priv->rx_dev.rx_dev_lock); spin_lock_init(&priv->rx_dev.rx_dev_lock);
tasklet_init(&priv->ks_wlan_hw.rx_bh_task, rx_event_task, tasklet_init(&priv->rx_bh_task, rx_event_task, (unsigned long)priv);
(unsigned long)priv);
return 0; return 0;
} }
...@@ -633,7 +631,7 @@ static void trx_device_exit(struct ks_wlan_private *priv) ...@@ -633,7 +631,7 @@ static void trx_device_exit(struct ks_wlan_private *priv)
inc_txqhead(priv); inc_txqhead(priv);
} }
tasklet_kill(&priv->ks_wlan_hw.rx_bh_task); tasklet_kill(&priv->rx_bh_task);
} }
static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index) static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index)
......
...@@ -89,7 +89,6 @@ struct hw_info_t { ...@@ -89,7 +89,6 @@ struct hw_info_t {
struct ks_sdio_card *sdio_card; struct ks_sdio_card *sdio_card;
struct workqueue_struct *ks7010sdio_wq; struct workqueue_struct *ks7010sdio_wq;
struct delayed_work rw_wq; struct delayed_work rw_wq;
struct tasklet_struct rx_bh_task;
}; };
struct ks_sdio_card { struct ks_sdio_card {
......
...@@ -414,6 +414,7 @@ struct wps_status_t { ...@@ -414,6 +414,7 @@ struct wps_status_t {
struct ks_wlan_private { struct ks_wlan_private {
struct hw_info_t ks_wlan_hw; /* hardware information */ struct hw_info_t ks_wlan_hw; /* hardware information */
struct tasklet_struct rx_bh_task;
struct net_device *net_dev; struct net_device *net_dev;
int reg_net; /* register_netdev */ int reg_net; /* register_netdev */
......
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