1
0
Fork 0
Commit Graph

18 Commits (8e8e69d67e5fad1a1edf97acebd649a6c8f1febd)

Author SHA1 Message Date
Thomas Gleixner 2874c5fd28 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:26:32 -07:00
Thomas Gleixner ec8f24b7fa treewide: Add SPDX license identifier - Makefile/Kconfig
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 10:50:46 +02:00
Masahiro Yamada 14340de506 media: prefix header search paths with $(srctree)/
Currently, the Kbuild core manipulates header search paths in a crazy
way [1].

To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
the search paths in the srctree. Some Makefiles are already written in
that way, but not all. The goal of this work is to make the notation
consistent, and finally get rid of the gross hacks.

Having whitespaces after -I does not matter since commit 48f6e3cf5b
("kbuild: do not drop -I without parameter").

[1]: https://patchwork.kernel.org/patch/9632347/

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2019-05-18 11:49:56 +09:00
Masahiro Yamada cc966c92c1 media: remove unneeded header search paths
I was able to build without these extra header search paths.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-05-18 11:49:56 +09:00
Mauro Carvalho Chehab b60a5b8dcf media: Kconfig files: use the right help coding style
Checkpatch wants to use 'help' instead of '---help---':

	WARNING: prefer 'help' over '---help---' for new help texts

Let's change it globally at the media subsystem, as otherwise people
would keep using the old way.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-20 06:47:51 -04:00
Colin Ian King c54dbfcda3 media: cxd2880-spi: fix two memory leaks of dvb_spi
There are two return paths that do not kfree dvb_spi. Fix the memory
leaks by returning via the exit label fail_adapter that will free
dvi_spi.

Detected by CoverityScan, CID#1475991 ("Resource Leak")

Fixes: cb496cd472 ("media: cxd2880-spi: Add optional vcc regulator")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>?
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-01-16 11:44:29 -05:00
Neil Armstrong cb496cd472 media: cxd2880-spi: Add optional vcc regulator
This patchset adds an optional VCC regulator to the driver probe function
to make sure power is enabled to the module before starting attaching to
the device.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-03 13:33:16 -05:00
Neil Armstrong 458ffce1cb media: cxd2880-spi: fix probe when dvb_attach fails
When dvb_attach fails, probe returns 0, and remove crashes afterwards.
This patch sets the return value to -ENODEV when attach fails.

Fixes: bd24fcddf6 ("media: cxd2880-spi: Add support for CXD2880 SPI interface")

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-03 13:26:48 -05:00
Yasunari Takiguchi 447f0081fc media: cxd2880-spi: Modified how to declare structure
This is the modification of structure declaration for spi_transfer.

Signed-off-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: Masayuki Yamamoto <Masayuki.Yamamoto@sony.com>
Signed-off-by: Hideki Nozawa <Hideki.Nozawa@sony.com>
Signed-off-by: Kota Yonezawa <Kota.Yonezawa@sony.com>
Signed-off-by: Toshihiko Matsumoto <Toshihiko.Matsumoto@sony.com>
Signed-off-by: Satoshi Watanabe <Satoshi.C.Watanabe@sony.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-05 10:37:12 -04:00
Arnd Bergmann 53dcd70eb7 media: cxd2880-spi: avoid out-of-bounds access warning
The -Warray-bounds warning in gcc-8 triggers for a newly added file:

drivers/media/spi/cxd2880-spi.c: In function 'cxd2880_write_reg':
drivers/media/spi/cxd2880-spi.c:111:3: error: 'memcpy' forming offset [133, 258] is out of the bounds [0, 132] of object 'send_data' with type 'u8[132]' {aka 'unsigned char[132]'} [-Werror=array-bounds]

The problem appears to be that we have two range checks in this function,
first comparing against BURST_WRITE_MAX (128) and then comparing against
a literal '255'. The logic checking the buffer size looks at the second
one and decides that this might be the actual maximum data length.

This is understandable behavior from the compiler, but the code is actually
safe. Since the first check is already shorter, we can remove the loop
and only leave that. To be on the safe side in case BURST_WRITE_MAX might
be increased, I'm leaving the check against U8_MAX.

Fixes: bd24fcddf6 ("media: cxd2880-spi: Add support for CXD2880 SPI interface")

Cc: Martin Sebor <msebor@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-04 11:27:00 -04:00
Yasunari Takiguchi 9dbaad428d media: cxd2880: Add all Makefile, Kconfig files and Update MAINTAINERS file for the driver
This is the Makefile, Kconfig files of driver
and MAINTAINERS file update about the driver
for the Sony CXD2880 DVB-T2/T tuner + demodulator.

Signed-off-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: Masayuki Yamamoto <Masayuki.Yamamoto@sony.com>
Signed-off-by: Hideki Nozawa <Hideki.Nozawa@sony.com>
Signed-off-by: Kota Yonezawa <Kota.Yonezawa@sony.com>
Signed-off-by: Toshihiko Matsumoto <Toshihiko.Matsumoto@sony.com>
Signed-off-by: Satoshi Watanabe <Satoshi.C.Watanabe@sony.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-07 05:02:57 -05:00
Mauro Carvalho Chehab 7cbc3013f6 media: cxd2880: Fix location of DVB headers
Fix a trivial conflict, where the location of DVB headers
got moved.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-07 05:02:37 -05:00
Yasunari Takiguchi bd24fcddf6 media: cxd2880-spi: Add support for CXD2880 SPI interface
This is the SPI adapter part of the driver for the
Sony CXD2880 DVB-T2/T tuner + demodulator.

Signed-off-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: Masayuki Yamamoto <Masayuki.Yamamoto@sony.com>
Signed-off-by: Hideki Nozawa <Hideki.Nozawa@sony.com>
Signed-off-by: Kota Yonezawa <Kota.Yonezawa@sony.com>
Signed-off-by: Toshihiko Matsumoto <Toshihiko.Matsumoto@sony.com>
Signed-off-by: Satoshi Watanabe <Satoshi.C.Watanabe@sony.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-03-07 04:39:19 -05:00
Wei Yongjun df94121f02 [media] gs1662: drop kfree for memory allocated with devm_kzalloc
It's not necessary to free memory allocated with devm_kzalloc
and using kfree leads to a double free.

Fixes: 7aae6e2df1 ("[media] Add GS1662 driver, a video serializer")

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-24 17:59:08 -02:00
Wei Yongjun b7491e7e90 [media] gs1662: remove .owner field for driver
Remove .owner field if calls are used which set it automatically.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-24 17:58:17 -02:00
Mauro Carvalho Chehab 3c3ba5452e [media] gs1662: make checkpatch happy
WARNING: line over 80 characters
+			     GS_HEIGHT_MAX, GS_PIXELCLOCK_MIN, GS_PIXELCLOCK_MAX,

WARNING: line over 80 characters
+		if (v4l2_match_dv_timings(timings, &reg_fmt[i].format, 0, false))

WARNING: Block comments use a trailing */ on a separate line
+	 * which looks like a video signal activity.*/

WARNING: else is not generally useful after a break or return
+		return gs_write_register(gs->pdev, REG_FORCE_FMT, reg_value);
+	} else {

WARNING: Block comments use a trailing */ on a separate line
+	 * which looks like a video signal activity.*/

ERROR: spaces required around that '=' (ctx:VxW)
+	.enum_dv_timings= gs_enum_dv_timings,
 	                ^

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19 14:39:49 -03:00
Hans Verkuil 8283a09299 [media] media Kconfig: improve the spi integration
The SPI driver looked a bit lonely in the config menu, and it didn't
support the autoselect. Shift things around a bit so it looks more logical.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19 14:37:05 -03:00
Charles-Antoine Couret 7aae6e2df1 [media] Add GS1662 driver, a video serializer
You can read datasheet here:
http://www.c-dis.net/media/871/GS1662_Datasheet.pdf

It's a component which supports HD and SD CEA or SDI formats
to SDI output. It's configured through SPI bus.

GS1662 driver is implemented as v4l2 subdev.

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19 14:36:24 -03:00