[PATCH] staging: media: av7110: remove dead av7110_reset_arm()

Stepan Ionichev posted 1 patch 1 month, 1 week ago
drivers/staging/media/av7110/av7110_hw.c | 21 ---------------------
1 file changed, 21 deletions(-)
[PATCH] staging: media: av7110: remove dead av7110_reset_arm()
Posted by Stepan Ionichev 1 month, 1 week ago
The av7110_reset_arm() function in av7110_hw.c is wrapped in an
"#if 0 / #endif" block and therefore not compiled into the driver.
The function name is not referenced from anywhere else in the
av7110 driver tree:

  $ git grep -n av7110_reset_arm drivers/staging/media/av7110/
  (no results after this change)

The actual ARM boot path is implemented by av7110_bootarm(), so the
disabled av7110_reset_arm() is leftover code with no remaining
purpose. Drop it; "#if 0" blocks are dead code and should be
removed rather than kept around (see coding-style.rst, section 21,
"Conditional Compilation").

The "/* av7110 ARM core boot stuff */" section comment is kept,
since it still applies to the helpers that follow (waitdebi(),
load_dram(), av7110_bootarm()).

No functional change.

Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
---
 drivers/staging/media/av7110/av7110_hw.c | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/drivers/staging/media/av7110/av7110_hw.c b/drivers/staging/media/av7110/av7110_hw.c
index 49ce29577..3cd0988db 100644
--- a/drivers/staging/media/av7110/av7110_hw.c
+++ b/drivers/staging/media/av7110/av7110_hw.c
@@ -96,27 +96,6 @@ u32 av7110_debiread(struct av7110 *av7110, u32 config, int addr, unsigned int co
 }
 
 /* av7110 ARM core boot stuff */
-#if 0
-void av7110_reset_arm(struct av7110 *av7110)
-{
-	saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTLO);
-
-	/* Disable DEBI and GPIO irq */
-	SAA7146_IER_DISABLE(av7110->dev, MASK_19 | MASK_03);
-	SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03);
-
-	saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTHI);
-	msleep(30);	/* the firmware needs some time to initialize */
-
-	ARM_ResetMailBox(av7110);
-
-	SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03);
-	SAA7146_IER_ENABLE(av7110->dev, MASK_03);
-
-	av7110->arm_ready = 1;
-	dprintk(1, "reset ARM\n");
-}
-#endif  /*  0  */
 
 static int waitdebi(struct av7110 *av7110, int adr, int state)
 {
-- 
2.33.0.windows.2