media: pt3: Use dma_set_mask_and_coherent() and simplify code
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 1 Jan 2022 21:28:51 +0000 (22:28 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 7 Dec 2022 16:58:46 +0000 (17:58 +0100)
commitf0ed939b6ab63f6ed9f9ff454f33997de10d8ae7
treef7e0619494fb32fe693f8ee7b8d4fe13765b5a05
parent6e616668a1958886fb80d1282150c2be6cc51c4f
media: pt3: Use dma_set_mask_and_coherent() and simplify code

Use dma_set_mask_and_coherent() instead of unrolling it with some
dma_set_mask()+dma_set_coherent_mask().

Moreover, as stated in [1], dma_set_mask() with a 64-bit mask will never
fail if dev->dma_mask is non-NULL.
So, if it fails, the 32 bits case will also fail for the same reason.

Simplify code and remove some dead code accordingly.

[1]: https://lkml.org/lkml/2021/6/7/398

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Akihiro Tsukada <tskd08@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/pci/pt3/pt3.c