diff mbox series

mt7603: remove mt7603_mcu_init routine

Message ID de62eeed41d63ee5444f7039592323750165f992.1552739522.git.lorenzo@kernel.org (mailing list archive)
State Accepted
Delegated to: Felix Fietkau
Headers show
Series mt7603: remove mt7603_mcu_init routine | expand

Commit Message

Lorenzo Bianconi March 16, 2019, 2:32 p.m. UTC
Remove mt7603_mcu_init since mcu.mutex has been already initialized
in mt76_mmio_init. Run mt7603_load_firmware directly in
mt7603_init_hardware

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7603/init.c   |  2 +-
 drivers/net/wireless/mediatek/mt76/mt7603/mcu.c    | 10 +---------
 drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h |  2 +-
 3 files changed, 3 insertions(+), 11 deletions(-)

Comments

Felix Fietkau March 16, 2019, 7:27 p.m. UTC | #1
On 2019-03-16 15:32, Lorenzo Bianconi wrote:
> Remove mt7603_mcu_init since mcu.mutex has been already initialized
> in mt76_mmio_init. Run mt7603_load_firmware directly in
> mt7603_init_hardware
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Applied, thanks.

- Felix
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/init.c b/drivers/net/wireless/mediatek/mt76/mt7603/init.c
index d54dda67d036..e17b6b89dfe2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/init.c
@@ -282,7 +282,7 @@  mt7603_init_hardware(struct mt7603_dev *dev)
 		mt76_poll(dev, MT_PSE_RTA, MT_PSE_RTA_BUSY, 0, 5000);
 	}
 
-	ret = mt7603_mcu_init(dev);
+	ret = mt7603_load_firmware(dev);
 	if (ret)
 		return ret;
 
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
index d06905ea8cc6..57481012ee47 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
@@ -170,8 +170,7 @@  mt7603_mcu_restart(struct mt7603_dev *dev)
 				   MCU_Q_NA);
 }
 
-static int
-mt7603_load_firmware(struct mt7603_dev *dev)
+int mt7603_load_firmware(struct mt7603_dev *dev)
 {
 	const struct firmware *fw;
 	const struct mt7603_fw_trailer *hdr;
@@ -269,13 +268,6 @@  mt7603_load_firmware(struct mt7603_dev *dev)
 	return ret;
 }
 
-int mt7603_mcu_init(struct mt7603_dev *dev)
-{
-	mutex_init(&dev->mt76.mmio.mcu.mutex);
-
-	return mt7603_load_firmware(dev);
-}
-
 void mt7603_mcu_exit(struct mt7603_dev *dev)
 {
 	mt7603_mcu_restart(dev);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
index 8bd00b97066a..b65348ea4868 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
@@ -176,7 +176,7 @@  void mt7603_unregister_device(struct mt7603_dev *dev);
 int mt7603_eeprom_init(struct mt7603_dev *dev);
 int mt7603_dma_init(struct mt7603_dev *dev);
 void mt7603_dma_cleanup(struct mt7603_dev *dev);
-int mt7603_mcu_init(struct mt7603_dev *dev);
+int mt7603_load_firmware(struct mt7603_dev *dev);
 void mt7603_init_debugfs(struct mt7603_dev *dev);
 
 static inline void mt7603_irq_enable(struct mt7603_dev *dev, u32 mask)