]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: s5p_cec: decrement usage count if disabled
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 28 Apr 2021 07:38:56 +0000 (09:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:15:46 +0000 (16:15 +0200)
[ Upstream commit 747bad54a677d8633ec14b39dfbeb859c821d7f2 ]

There's a bug at s5p_cec_adap_enable(): if called to
disable the device, it should call pm_runtime_put()
instead of pm_runtime_disable(), as the goal here is to
decrement the usage_count and not to disable PM runtime.

Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Fixes: 1bcbf6f4b6b0 ("[media] cec: s5p-cec: Add s5p-cec driver")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/s5p-cec/s5p_cec.c

index 8837e2678bdeb3507e4ebce501e5ee58216334ad..3032247c63a51d8dd52bd19bc88a976b3ddd0eeb 100644 (file)
@@ -55,7 +55,7 @@ static int s5p_cec_adap_enable(struct cec_adapter *adap, bool enable)
        } else {
                s5p_cec_mask_tx_interrupts(cec);
                s5p_cec_mask_rx_interrupts(cec);
-               pm_runtime_disable(cec->dev);
+               pm_runtime_put(cec->dev);
        }
 
        return 0;