OSDN Git Service

media: ddbridge: don't uselessly check for dma in start/stop functions
authorDaniel Scheller <d.scheller@gmx.net>
Mon, 16 Apr 2018 17:36:00 +0000 (13:36 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 17 Apr 2018 09:52:43 +0000 (05:52 -0400)
commit8b8fcf32502694971fb7f166030361212cb2f9e6
tree9f046adcb6c9154e7247b4deecd6467aa0ff006e
parentcac61a1acb1def146c3900f1c8f7af4947d98814
media: ddbridge: don't uselessly check for dma in start/stop functions

The check for a valid ptr in ddb_io->dma isn't really necessary since only
devices that do data transport using DMA are supported by the driver, and
all previous initialisation code (through input_init(), output_init() and
dma_init(), has_dma is always true as it's set in ddb_probe() during
driver load) guarantees the ptr is set.

As a side effect, this silences these sparse warnings (albeit them being
false positives as ddb_io->dma won't change in these functions so the
condition always equals to the same result):

    drivers/media/pci/ddbridge/ddbridge-core.c:495:9: warning: context imbalance in 'ddb_output_start' - different lock contexts for basic block
    drivers/media/pci/ddbridge/ddbridge-core.c:510:9: warning: context imbalance in 'ddb_output_stop' - different lock contexts for basic block
    drivers/media/pci/ddbridge/ddbridge-core.c:525:9: warning: context imbalance in 'ddb_input_stop' - different lock contexts for basic block
    drivers/media/pci/ddbridge/ddbridge-core.c:560:9: warning: context imbalance in 'ddb_input_start' - different lock contexts for basic block

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/ddbridge/ddbridge-core.c