diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-10-07 16:37:53 +0400 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-10-19 10:56:19 +0400 |
commit | af77dfa7811cd4e533003a9e7e9bf27dece96c6d (patch) | |
tree | fa2b04d211e450631414fb9cf6d31aa251887947 /drivers/net/wimax/i2400m/driver.c | |
parent | b9ee95010bee6c0e17d18bc9d9c0cfab6e8cb73a (diff) | |
download | linux-af77dfa7811cd4e533003a9e7e9bf27dece96c6d.tar.xz |
wimax/i2400m: move i2400m_init() out of i2400m.h
Upcoming changes will have to add things to this function that expose
more internals, which would mean more forward declarators.
Frankly, it doesn't need to be an inline, so moved to driver.c, where
the declarations will be taken from the header file.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/driver.c')
-rw-r--r-- | drivers/net/wimax/i2400m/driver.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c index 10673af5a7f0..9b78e059563d 100644 --- a/drivers/net/wimax/i2400m/driver.c +++ b/drivers/net/wimax/i2400m/driver.c @@ -849,6 +849,36 @@ void i2400m_bm_buf_free(struct i2400m *i2400m) /** + * i2400m_init - Initialize a 'struct i2400m' from all zeroes + * + * This is a bus-generic API call. + */ +void i2400m_init(struct i2400m *i2400m) +{ + wimax_dev_init(&i2400m->wimax_dev); + + i2400m->boot_mode = 1; + i2400m->rx_reorder = 1; + init_waitqueue_head(&i2400m->state_wq); + + spin_lock_init(&i2400m->tx_lock); + i2400m->tx_pl_min = UINT_MAX; + i2400m->tx_size_min = UINT_MAX; + + spin_lock_init(&i2400m->rx_lock); + i2400m->rx_pl_min = UINT_MAX; + i2400m->rx_size_min = UINT_MAX; + + mutex_init(&i2400m->msg_mutex); + init_completion(&i2400m->msg_completion); + + mutex_init(&i2400m->init_mutex); + /* wake_tx_ws is initialized in i2400m_tx_setup() */ +} +EXPORT_SYMBOL_GPL(i2400m_init); + + +/** * i2400m_setup - bus-generic setup function for the i2400m device * * @i2400m: device descriptor (bus-specific parts have been initialized) |