summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid/vivid-rds-gen.c
AgeCommit message (Collapse)Author
2020-04-14media: split test drivers from platform directoryMauro Carvalho Chehab
When the first test device was added (vivi.c), there were just one file. I was too lazy on that time to create a separate directory just for it, so I kept it together with platform. Now, we have vivid, vicodec, vim2m and vimc. Also, a new virtual driver has been prepared to support DVB API. So, it is time to solve this mess, by placing test stuff on a separate directory. It should be noticed that we also have some skeleton drivers (for V4L and for DVB). For now, we'll keep them separate, as they're not really test drivers, but instead, just examples. The DVB frontend ones will likely be part of a new DVB test driver. By that time, it should make sense to move them here as well. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2018-09-11media: use strscpy() instead of strlcpy()Mauro Carvalho Chehab
The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-02-14media: vivid: add SPDX license infoHans Verkuil
Replace the old license information with the corresponding SPDX license. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-08media: vivid: print time in y2038-safe wayArnd Bergmann
time_to_tm() takes a time_t value that overflows in 2038 on 32-bit systems. time64_to_tm() doesn't have this problem, so let's use that in combination with ktime_get_real_seconds() to read a 64-bit time value. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-04-20[media] vivid: fix smatch errorsHans Verkuil
The smatch utility got really confused about the grp % 22 code. Rewrote it so it now understands that there really isn't a buffer overwrite. vivid-rds-gen.c:82 vivid_rds_generate() error: buffer overflow 'rds->psname' 9 <= 43 vivid-rds-gen.c:83 vivid_rds_generate() error: buffer overflow 'rds->psname' 9 <= 42 vivid-rds-gen.c:89 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 84 vivid-rds-gen.c:90 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 85 vivid-rds-gen.c:92 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 86 vivid-rds-gen.c:93 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 87 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-08[media] vivid: add missing includesHans Verkuil
Fix kbuild test robot warnings about missing vmalloc.h and string.h includes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02[media] vivid: add support for radio receivers and transmittersHans Verkuil
This adds radio receiver and transmitter support. Part of that is common to both and so is placed in the radio-common source. These drivers also support RDS. In order to generate valid RDS data a simple RDS generator is implemented in rds-gen. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>