aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-07 08:37:53 -0400
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 02:56:19 -0400
commitaf77dfa7811cd4e533003a9e7e9bf27dece96c6d (patch)
treefa2b04d211e450631414fb9cf6d31aa251887947 /drivers/net/wimax
parentb9ee95010bee6c0e17d18bc9d9c0cfab6e8cb73a (diff)
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')
-rw-r--r--drivers/net/wimax/i2400m/driver.c30
-rw-r--r--drivers/net/wimax/i2400m/i2400m.h31
2 files changed, 31 insertions, 30 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)
849 849
850 850
851/** 851/**
852 * i2400m_init - Initialize a 'struct i2400m' from all zeroes
853 *
854 * This is a bus-generic API call.
855 */
856void i2400m_init(struct i2400m *i2400m)
857{
858 wimax_dev_init(&i2400m->wimax_dev);
859
860 i2400m->boot_mode = 1;
861 i2400m->rx_reorder = 1;
862 init_waitqueue_head(&i2400m->state_wq);
863
864 spin_lock_init(&i2400m->tx_lock);
865 i2400m->tx_pl_min = UINT_MAX;
866 i2400m->tx_size_min = UINT_MAX;
867
868 spin_lock_init(&i2400m->rx_lock);
869 i2400m->rx_pl_min = UINT_MAX;
870 i2400m->rx_size_min = UINT_MAX;
871
872 mutex_init(&i2400m->msg_mutex);
873 init_completion(&i2400m->msg_completion);
874
875 mutex_init(&i2400m->init_mutex);
876 /* wake_tx_ws is initialized in i2400m_tx_setup() */
877}
878EXPORT_SYMBOL_GPL(i2400m_init);
879
880
881/**
852 * i2400m_setup - bus-generic setup function for the i2400m device 882 * i2400m_setup - bus-generic setup function for the i2400m device
853 * 883 *
854 * @i2400m: device descriptor (bus-specific parts have been initialized) 884 * @i2400m: device descriptor (bus-specific parts have been initialized)
diff --git a/drivers/net/wimax/i2400m/i2400m.h b/drivers/net/wimax/i2400m/i2400m.h
index f5ed7d5cee47..4f8815d88874 100644
--- a/drivers/net/wimax/i2400m/i2400m.h
+++ b/drivers/net/wimax/i2400m/i2400m.h
@@ -576,36 +576,6 @@ struct i2400m {
576 576
577 577
578/* 578/*
579 * Initialize a 'struct i2400m' from all zeroes
580 *
581 * This is a bus-generic API call.
582 */
583static inline
584void i2400m_init(struct i2400m *i2400m)
585{
586 wimax_dev_init(&i2400m->wimax_dev);
587
588 i2400m->boot_mode = 1;
589 i2400m->rx_reorder = 1;
590 init_waitqueue_head(&i2400m->state_wq);
591
592 spin_lock_init(&i2400m->tx_lock);
593 i2400m->tx_pl_min = UINT_MAX;
594 i2400m->tx_size_min = UINT_MAX;
595
596 spin_lock_init(&i2400m->rx_lock);
597 i2400m->rx_pl_min = UINT_MAX;
598 i2400m->rx_size_min = UINT_MAX;
599
600 mutex_init(&i2400m->msg_mutex);
601 init_completion(&i2400m->msg_completion);
602
603 mutex_init(&i2400m->init_mutex);
604 /* wake_tx_ws is initialized in i2400m_tx_setup() */
605}
606
607
608/*
609 * Bus-generic internal APIs 579 * Bus-generic internal APIs
610 * ------------------------- 580 * -------------------------
611 */ 581 */
@@ -737,6 +707,7 @@ unsigned i2400m_brh_get_signature(const struct i2400m_bootrom_header *hdr)
737/* 707/*
738 * Driver / device setup and internal functions 708 * Driver / device setup and internal functions
739 */ 709 */
710extern void i2400m_init(struct i2400m *);
740extern void i2400m_netdev_setup(struct net_device *net_dev); 711extern void i2400m_netdev_setup(struct net_device *net_dev);
741extern int i2400m_sysfs_setup(struct device_driver *); 712extern int i2400m_sysfs_setup(struct device_driver *);
742extern void i2400m_sysfs_release(struct device_driver *); 713extern void i2400m_sysfs_release(struct device_driver *);