From: Samuel Holland Date: Mon, 18 Jan 2021 06:00:45 +0000 (+0100) Subject: media: sunxi-cir: Clean up dead register writes X-Git-Tag: accepted/tizen/unified/20230118.172025~7835^2~161 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=586bb700b3256a1cb38935f83c76e6522ac53d64;p=platform%2Fkernel%2Flinux-rpi.git media: sunxi-cir: Clean up dead register writes The register writes during driver removal occur after the device is already put back in reset, so they never had any effect. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c index 8555c77..0a7f7ea 100644 --- a/drivers/media/rc/sunxi-cir.c +++ b/drivers/media/rc/sunxi-cir.c @@ -342,22 +342,12 @@ exit_reset_assert: static int sunxi_ir_remove(struct platform_device *pdev) { - unsigned long flags; struct sunxi_ir *ir = platform_get_drvdata(pdev); clk_disable_unprepare(ir->clk); clk_disable_unprepare(ir->apb_clk); reset_control_assert(ir->rst); - spin_lock_irqsave(&ir->ir_lock, flags); - /* disable IR IRQ */ - writel(0, ir->base + SUNXI_IR_RXINT_REG); - /* clear All Rx Interrupt Status */ - writel(REG_RXSTA_CLEARALL, ir->base + SUNXI_IR_RXSTA_REG); - /* disable IR */ - writel(0, ir->base + SUNXI_IR_CTL_REG); - spin_unlock_irqrestore(&ir->ir_lock, flags); - rc_unregister_device(ir->rc); return 0; }