Skip to contentSkip to conversation

staging: media: av7110: remove dead av7110_reset_arm()

PATCH New Stepan Ionichev 1 participant 1 message May 4

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: media: av7110: remove dead av7110_reset_arm()

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.

---
 drivers/staging/media/av7110/av7110_hw.c | 21 ---------------------
 1 file changed, 21 deletions(-)
drivers/staging/media/av7110/av7110_hw.c +0 -21
index 49ce29577..3cd0988db 100644
@@ -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)
 {
Signature · 1 line
2.33.0.windows.2