media: vidtv: fix build on 32bit architectures
authorDaniel W. S. Almeida <dwlsalmeida@gmail.com>
Wed, 16 Sep 2020 20:05:40 +0000 (22:05 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 17 Sep 2020 10:02:58 +0000 (12:02 +0200)
commit37b288f54bb9acb42bf384d92f7c95d8bad45ca8
tree3090e5a420a0cbdc30f8501afbdbf5d3cedae153
parentc5d83ba23e66e539200de347cd6dca93b1041e3c
media: vidtv: fix build on 32bit architectures

Fix the following error for builds on 32bit architectures:

ERROR: modpost: "__udivdi3"
[drivers/media/test-drivers/vidtv/dvb-vidtv-bridge.ko] undefined!

Which is due to 64bit divisions that did not go through the helpers
in linux/math64.h

As vidtv_mux_check_mux_rate was not operational in its current form,
drop the entire function while it is not fixed properly.

For now, call vidtv_mux_pad_with_nulls with a constant number of packets
to avoid warnings due to unused functions when building this driver.

The 64bit division used in the s302m is not needed, remove them and use
a fixed number of frames and a constant PTS increment instead.

Fixes: f90cf6079bf67988 ("media: vidtv: add a bridge driver")
Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/test-drivers/vidtv/vidtv_encoder.h
drivers/media/test-drivers/vidtv/vidtv_mux.c
drivers/media/test-drivers/vidtv/vidtv_s302m.c
drivers/media/test-drivers/vidtv/vidtv_s302m.h