Commit Graph

640 Commits

Author SHA1 Message Date
Hans Verkuil
1a5cfd0227 [media] wl128x: fix fmdbg compiler warning
fmdrv_common.c: In function 'fm_download_firmware':
fmdrv_common.c:1259:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]
   fmdbg("Firmware(%s) length : %d bytes\n", fw_name, fw_entry->size);
   ^

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-24 09:27:34 -02:00
Mauro Carvalho Chehab
a66d05d504 Merge branch 'patchwork' into v4l_for_linus
* patchwork: (544 commits)
  [media] ir-hix5hd2: fix build on c6x arch
  [media] pt3: fix DTV FE I2C driver load error paths
  Revert "[media] media: em28xx - remove reset_resume interface"
  [media] exynos4-is: fix some warnings when compiling on arm64
  [media] usb drivers: use %zu instead of %zd
  [media] pci drivers: use %zu instead of %zd
  [media] dvb-frontends: use %zu instead of %zd
  [media] s5p-mfc: Fix several printk warnings
  [media] s5p_mfc_opr: Fix warnings
  [media] ti-vpe: Fix typecast
  [media] s3c-camif: fix dma_addr_t printks
  [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits
  [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64
  [media] em28xx: Fix identation
  [media] drxd: remove a dead code
  [media] saa7146: remove return after BUG()
  [media] cx88: remove return after BUG()
  [media] cx88: fix cards table CodingStyle
  [media] radio-sf16fmr2: declare some structs as static
  [media] radio-sf16fmi: declare pnp_attached as static
  ...

Conflicts:
	Documentation/DocBook/media/v4l/compat.xml
2014-10-09 14:00:54 -03:00
Mauro Carvalho Chehab
25fb62b61b [media] radio-sf16fmr2: declare some structs as static
drivers/media/radio/radio-sf16fmr2.c:308:19: warning: symbol 'fmr2_isa_driver' was not declared. Should it be static?
drivers/media/radio/radio-sf16fmr2.c:316:19: warning: symbol 'fmr2_pnp_driver' was not declared. Should it be static?

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:56 -03:00
Mauro Carvalho Chehab
24c8f11f8b [media] radio-sf16fmi: declare pnp_attached as static
drivers/media/radio/radio-sf16fmi.c:59:6: warning: symbol 'pnp_attached' was not declared. Should it be static?

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:47:55 -03:00
Randy Dunlap
7102076c92 [media] media/radio: fix radio-miropcm20.c build with io.h header file
Fix build errors in radio-miropcm20.c due to missing header file:

drivers/media/radio/radio-miropcm20.c: In function 'rds_waitread':
drivers/media/radio/radio-miropcm20.c:90:3: error: implicit declaration of function 'inb' [-Werror=implicit-function-declaration]
drivers/media/radio/radio-miropcm20.c: In function 'rds_rawwrite':
drivers/media/radio/radio-miropcm20.c:106:3: error: implicit declaration of function 'outb' [-Werror=implicit-function-declaration]

Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21 20:50:38 -03:00
Himangi Saraogi
a0ffe4c090 [media] radio-si470x-usb: use USB API functions rather than constants
This patch introduces the use of the function usb_endpoint_is_int_in.

The Coccinelle semantic patch that makes these changes is as follows:

@@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_INT\|3\))
+ usb_endpoint_xfer_int(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd))
+ usb_endpoint_is_int_in(epd)

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21 20:10:33 -03:00
Mauro Carvalho Chehab
8b4b68186f [media] radio: use true/false for boolean vars
Instead of using 0 or 1 for boolean, use the true/false
defines.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:20 -03:00
Hans Verkuil
2a8b7e5888 [media] wl128x: fix sparse warnings
drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:443:41: warning: incorrect type in assignment (different base types)
drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16
drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:39:15 -03:00
Hans Verkuil
7754622baa [media] radio-tea5764: fix sparse warnings
drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16
drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16
drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16
drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16
drivers/media/radio/radio-tea5764.c:185:20: warning: incorrect type in assignment (different base types)
drivers/media/radio/radio-tea5764.c:186:20: warning: incorrect type in assignment (different base types)
drivers/media/radio/radio-tea5764.c:187:20: warning: incorrect type in assignment (different base types)
drivers/media/radio/radio-tea5764.c:188:20: warning: incorrect type in assignment (different base types)
drivers/media/radio/radio-tea5764.c:189:20: warning: incorrect type in assignment (different base types)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:30:56 -03:00
Wei Yongjun
27dcb00d0d [media] radio-miropcm20: fix sparse NULL pointer warning
Fixes the following sparse warnings:

drivers/media/radio/radio-miropcm20.c:193:33: warning:
 Using plain integer as NULL pointer

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30 19:50:09 -03:00
Mauro Carvalho Chehab
9c46c7facd [media] radio-miropcm20: fix a compilation warning
drivers/media/radio/radio-miropcm20.c: In function 'sanitize':
drivers/media/radio/radio-miropcm20.c:216:3: warning: comparison is always false due to limited range of data type [-Wtype-limits]
   if (p[i] < 32 || p[i] >= 128) {
   ^

As p is declared as a char array, it is signed. So, it can never
be bigger than 127.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25 19:35:16 -03:00
Hans Verkuil
fdcfd4e704 [media] radio-miropcm20: add RDS support
Once upon a time the radio-miropcm20 driver had RDS support. However, after
some internal kernel changes that support was removed. Now that we have a
nice RDS API I have been working on adding back this support. It has been
tested with the si4713 RDS transmitter and it is working quite nicely.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25 19:29:47 -03:00
Hans Verkuil
1abba28cf1 [media] si4713: add the missing RDS functionality
Not all the RDS features of the si4713 were supported. Add
the missing bits to fully support the hardware capabilities.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25 19:27:29 -03:00
Hans Verkuil
0d5e8c4313 [media] Fix 64-bit division fall-out from 64-bit control ranges
Commit 0ba2aeb6da increased the internal control ranges
to 64 bit, but that caused problems in drivers that use the minimum/maximum/step/default_value
control values in a division or modulus operations since not all architectures support
those natively.

Luckily, in almost all cases it is possible to just cast to 32 bits (the control value
is known to be 32 bits, so it is safe to cast). Only in v4l2-ctrls.c was it necessary to
use do_div in one function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 12:44:38 -03:00
Hans Verkuil
2a9ec37311 [media] v4l2-ctrls: use ptrs for all but the s32 type
Rather than having two unions for all types just keep 'val' and
'cur.val' and use the p_cur and p_new unions to access all others.

The only reason for keeping 'val' and 'cur.val' is that it is used
all over, so converting this as well would be a huge job.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:17 -03:00
Ramakrishnan Muthukrishnan
95cd5d5ee6 [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO
Since all the drivers that use `struct v4l2_fh' use the core
priority checking, the setting of the flag in the drivers can
be removed.

Signed-off-by: Ramakrishnan Muthukrishnan <ramakrmu@cisco.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:14:59 -03:00
Pranith Kumar
8effbff4e2 [media] update reference, kerneltrap.org no longer works
kerneltrap.org no longer works, update to a working reference

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 15:44:10 -03:00
Hans Verkuil
08debc1701 [media] si4713: fix Kconfig dependencies
The SI4713 select should be I2C_SI4713 and the USB driver needs to depend on
I2C as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-28 18:06:55 -03:00
Hans Verkuil
ce0ede2c06 [media] radio-cadet: avoid interruptible_sleep_on race
interruptible_sleep_on is racy and going away. This replaces
one use in the radio-cadet driver with a wait_event_interruptible
call. Special care was taken that accesses to the rdsin and rdsout
indices are always done with dev->lock held.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-28 14:30:30 -03:00
Hans Verkuil
ab3cacf6d9 [media] radio-usb-si4713: make array of structs const
The start_seq[] should be const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-24 10:56:22 -03:00
Sachin Kamat
2d27b37d35 [media] radio-keene: Use module_usb_driver
module_usb_driver eliminates the boilerplate and makes the code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-04 09:57:49 -02:00
Wei Yongjun
b3c8154eb9 [media] radio-usb-si4713: fix sparse non static symbol warnings
Fixes the following sparse warnings:

drivers/media/radio/si4713/radio-usb-si4713.c:226:31: warning:
 symbol 'start_seq' was not declared. Should it be static?
drivers/media/radio/si4713/radio-usb-si4713.c:291:29: warning:
 symbol 'command_table' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-15 09:12:51 -02:00
Mauro Carvalho Chehab
eab924d0e2 [media] tea575x: Fix build with ARCH=c6x
In file included from /devel/v4l/temp/include/asm-generic/page.h:23:0,
                 from /devel/v4l/temp/arch/c6x/include/asm/page.h:9,
                 from /devel/v4l/temp/include/asm-generic/io.h:14,
                 from arch/c6x/include/generated/asm/io.h:1,
                 from /devel/v4l/temp/drivers/media/radio/tea575x.c:23:
/devel/v4l/temp/arch/c6x/include/asm/setup.h:17:27: error: unknown type name ‘phys_addr_t’
 extern int c6x_add_memory(phys_addr_t start, unsigned long size);

It seems that, on such arch, the includes from asm/ should be
after the ones from linux/.

The proper fix would be to patch the arch files, but, as
this fix is trivial, apply it. Also, we generally put the
asm includes after the linux ones, anyway.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13 16:28:23 -02:00
Mauro Carvalho Chehab
6fcd3b619c [media] radio-usb-si4713: make si4713_register_i2c_adapter static
This function isn't used nowhere outside the same .c file.
Fixes this warning:

drivers/media/radio/si4713/radio-usb-si4713.c:418:5: warning: no previous prototype for 'si4713_register_i2c_adapter' [-Wmissing-prototypes]
 int si4713_register_i2c_adapter(struct si4713_usb_device *radio)
     ^

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13 16:28:08 -02:00
Hans Verkuil
21326c461e [media] radio-raremono: add support for 'Thanko's Raremono' AM/FM/SW USB device
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Dinesh Ram <dinesh.ram@cern.ch>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 11:30:32 -02:00
Hans Verkuil
5df2def550 [media] si470x: add check to test if this is really a si470x
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 11:28:41 -02:00
Hans Verkuil
567e2e9660 [media] si470x: don't use buffer on the stack for USB transfers
You shouldn't use buffers allocated on the stack for USB transfers,
always kmalloc them.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 11:28:04 -02:00
Hans Verkuil
cb15da3636 [media] si4713: coding style time-related cleanups
Fix the non-whitespace checkpatch errors/warnings.
Replace msleep with usleep_range and the jiffies comparison with
time_is_after_jiffies().

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Dinesh Ram <dinesh.ram@cern.ch>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:41:22 -02:00
Hans Verkuil
9ca33ccd53 [media] si4713: coding style whitespace cleanups
Fix most whitespace-related checkpatch errors/warnings.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Dinesh Ram <dinesh.ram@cern.ch>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:41:05 -02:00
Eduardo Valentin
b2c6eedb1f [media] si4713: print product number
Print the PN value, useful to check what chip the dev board has.

Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:40:41 -02:00
Hans Verkuil
8aab72bb07 [media] si4713: si4713_set_rds_radio_text overwrites terminating \0
si4713_set_rds_radio_text will overwrite the terminating zero at the
end of the rds radio text string in order to send out a carriage return
as per the RDS spec.
Use a separate char buffer for the CR instead of corrupting the control
string.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:40:30 -02:00
Dinesh Ram
cc6d618fdf [media] si4713: move supply list to si4713_platform_data
The supply list is needed by the platform driver, but not by the usb driver.
So this information belongs to the platform data and should not be hardcoded
in the subdevice driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:40:07 -02:00
Dinesh Ram
b874b39fcd [media] si4713: Added the USB driver for Si4713
This is the USB driver for the Silicon Labs development board.
It contains the Si4713 FM transmitter chip.

Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:37:57 -02:00
Dinesh Ram
e26fa6dccf [media] si4713: Bug fix for si4713_tx_tune_power() method in the i2c driver
In the si4713_tx_tune_power() method, the args array element 'power'
can take values between SI4713_MIN_POWER and SI4713_MAX_POWER. power = 0
is also valid. All the values (0 > power < SI4713_MIN_POWER) are illegal
and hence are all mapped to SI4713_MIN_POWER.

Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:35:57 -02:00
Dinesh Ram
d808f5bc72 [media] si4713: Reorganized includes in si4713.c/h
Moved the header <linux/regulator/consumer.h> from si4713.c to si4713.h

Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:35:28 -02:00
Dinesh Ram
5173332c1e [media] si4713: Modified i2c driver to handle cases where interrupts are not used
Checks have been introduced at several places in the code to test if an
interrupt is set or not. For devices which do not use the interrupt, to
get a valid response, within a specified timeout, the device is polled
instead.

Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:35:14 -02:00
Dinesh Ram
7391232e12 [media] si4713: Reorganized drivers/media/radio directory
Added a new si4713 directory which will contain all si4713 related files.
Also updated Makefile and Kconfig

Signed-off-by: Dinesh Ram <dinesh.ram@cern.ch>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:30:00 -02:00
Jonathan McCrohan
f58c91ce82 [media] media_tree: Fix spelling errors
Fix various spelling errors in strings and comments throughout the media
tree. The majority of these were found using Lucas De Marchi's codespell
tool.

[m.chehab@samsung.com: discard hunks with conflicts]

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-09 14:50:50 -02:00
Hans de Goede
c7223f8f66 [media] radio-shark2: Mark shark_resume_leds() inline to kill compiler warning
This mirrors the patch to the radio-shark driver by Geert Uytterhoeven.
If SHARK_USE_LEDS=1, but CONFIG_PM=n:
drivers/media/radio/radio-shark2.c:240: warning: ‘shark_resume_leds’ defined but not used
Instead of making the #ifdef logic even more complicated (there are already
two definitions of shark_resume_leds()), mark shark_resume_leds() inline to
kill the compiler warning. shark_resume_leds() is small and it has only one
caller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-09 14:50:50 -02:00
Geert Uytterhoeven
812c083ec4 [media] radio-shark: Mark shark_resume_leds() inline to kill compiler warning
If SHARK_USE_LEDS=1, but CONFIG_PM=n:
drivers/media/radio/radio-shark.c:275: warning: ‘shark_resume_leds’ defined but not used
Instead of making the #ifdef logic even more complicated (there are already
two definitions of shark_resume_leds()), mark shark_resume_leds() inline to
kill the compiler warning. shark_resume_leds() is small and it has only one
caller.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-09 14:50:49 -02:00
Hans Verkuil
9ba6a91f19 [media] tef6862/radio-tea5764: actually assign clamp result
When adding frequency clamping to the tef6862 and radio-tea5764 drivers
I forgot to actually *assign* the clamp result to the frequency.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Hans Petter Selasky <hps@bitfrost.no>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: stable@vger.kernel.org # for 3.11 and up
2013-11-29 14:22:35 -02:00
Linus Torvalds
3ea369eea0 Merge branch 'topic/kbuild-fixes-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media build fixes from Mauro Carvalho Chehab:
 "A series of patches that fix compilation on non-x86 archs.

  While most of them are just build fixes, there are some fixes for real
  bugs, as there are a number of drivers using dynamic stack allocation.
  A few of those might be considered a security risk, if the i2c-dev
  module is loaded, as someone could be sending very long I2C data that
  could potentially overflow the Kernel stack.  Ok, as using /dev/i2c-*
  devnodes usually requires root on usual distros, and exploiting it
  would require a DVB board or USB stick, the risk is not high"

* 'topic/kbuild-fixes-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (28 commits)
  [media] platform drivers: Fix build on frv arch
  [media] lirc_zilog: Don't use dynamic static allocation
  [media] mxl111sf: Don't use dynamic static allocation
  [media] af9035: Don't use dynamic static allocation
  [media] af9015: Don't use dynamic static allocation
  [media] dw2102: Don't use dynamic static allocation
  [media] dibusb-common: Don't use dynamic static allocation
  [media] cxusb: Don't use dynamic static allocation
  [media] v4l2-async: Don't use dynamic static allocation
  [media] cimax2: Don't use dynamic static allocation
  [media] tuner-xc2028: Don't use dynamic static allocation
  [media] tuners: Don't use dynamic static allocation
  [media] av7110_hw: Don't use dynamic static allocation
  [media] stv090x: Don't use dynamic static allocation
  [media] stv0367: Don't use dynamic static allocation
  [media] stb0899_drv: Don't use dynamic static allocation
  [media] dvb-frontends: Don't use dynamic static allocation
  [media] dvb-frontends: Don't use dynamic static allocation
  [media] s5h1420: Don't use dynamic static allocation
  [media] uvc/lirc_serial: Fix some warnings on parisc arch
  ...
2013-11-18 15:10:05 -08:00
Linus Torvalds
a310410f61 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 "This series include:
   - a new Remote Controller driver for ST SoC with the corresponding DT
     bindings
   - a new frontend (cx24117)
   - a new I2C camera flash driver (lm3560)
   - a new mem2mem driver for TI SoC (ti-vpe)
   - support for Raphael r828d added to r820t driver
   - some improvements on buffer allocation at VB2 core
   - usual driver fixes and improvements

  PS this time, we have a smaller number of patches.  While it is hard
  to pinpoint to the reasons, I believe that it is mainly due to:

   1) there are several patch series ready, but depending on DT review.
      I decided to grant some extra time for DT maintainers to look on
      it, as they're expecting to have more time with the changes agreed
      during ARM mini-summit and KS.  If they can't review in time for
      3.14, I'll review myself and apply for the next merge window.

   2) I suspect that having both LinuxCon EU and LinuxCon NA happening
      during the same merge window affected the development
      productivity, as several core media developers participated on
      both events"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (151 commits)
  [media] media: st-rc: Add ST remote control driver
  [media] gpio-ir-recv: Include linux/of.h header
  [media] tvp7002: Include linux/of.h header
  [media] tvp514x: Include linux/of.h header
  [media] ths8200: Include linux/of.h header
  [media] adv7343: Include linux/of.h header
  [media] v4l: Fix typo in v4l2_subdev_get_try_crop()
  [media] media: i2c: add driver for dual LED Flash, lm3560
  [media] rtl28xxu: add 15f4:0131 Astrometa DVB-T2
  [media] rtl28xxu: add RTL2832P + R828D support
  [media] rtl2832: add new tuner R828D
  [media] r820t: add support for R828D
  [media] media/i2c: ths8200: fix build failure with gcc 4.5.4
  [media] Add support for KWorld UB435-Q V2
  [media] staging/media: fix msi3101 build errors
  [media] ddbridge: Remove casting the return value which is a void pointer
  [media] ngene: Remove casting the return value which is a void pointer
  [media] dm1105: remove unneeded not-null test
  [media] sh_mobile_ceu_camera: remove deprecated IRQF_DISABLED
  [media] media: rcar_vin: Add preliminary r8a7790 support
  ...
2013-11-18 15:08:02 -08:00
Wolfram Sang
16735d022f tree-wide: use reinit_completion instead of INIT_COMPLETION
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.

[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-15 09:32:21 +09:00
Mauro Carvalho Chehab
c6c3795eef [media] radio-si470x-i2c: fix a warning on ia64
on ia64, those warnings appear:
	drivers/media/radio/si470x/radio-si470x-i2c.c:470:12: warning: 'si470x_i2c_suspend' defined but not used [-Wunused-function]
	drivers/media/radio/si470x/radio-si470x-i2c.c:487:12: warning: 'si470x_i2c_resume' defined but not used [-Wunused-function]
They're caused because the PM logic uses this define:
	#define SET_SYSTEM_SLEEP_PM_OPS()
With is only defined for CONFIG_PM_SLEEP.
So, change the logic there to test for CONFIG_PM_SLEEP, instead of
CONFIG_PM.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-08 09:45:36 -02:00
Mauro Carvalho Chehab
5f27ca418b [media] tef6862: fix warning on avr32 arch
On avr32 arch, we get those warnings:
	drivers/media/radio/tef6862.c:59:1: warning: "MODE_SHIFT" redefined
	In file included from /devel/v4l/ktest-build/arch/avr32/include/asm/ptrace.h:11,
	arch/avr32/include/uapi/asm/ptrace.h:41:1: warning: this is the location of the previous definition
Prefix MSA_ to the MSA register bitmap macros, to avoid reusing the same symbol.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-07 15:04:07 -02:00
Mauro Carvalho Chehab
c5b0b3cb8a [media] radio-shark: remove a warning when CONFIG_PM is not defined
On alpha, allyesconfig doesn't have CONFIG_PM, and produces the following warnings:
	drivers/media/radio/radio-shark.c:274:13: warning: 'shark_resume_leds' defined but not used [-Wunused-function]
	drivers/media/radio/radio-shark2.c:240:13: warning: 'shark_resume_leds' defined but not used [-Wunused-function]
That's because those functions are used only at device resume.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-07 15:03:14 -02:00
Michael Opdenacker
0798ec69b8 [media] radio-si4713: remove deprecated IRQF_DISABLED
This patch proposes to remove the use of the IRQF_DISABLED flag
It's a NOOP since 2.6.35 and it will be removed one day.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17 05:55:59 -03:00
Joe Perches
2028c71d54 [media] media: Remove unnecessary semicolons
These aren't necessary after switch and while statements.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17 05:51:57 -03:00
Hans Verkuil
437eb18d80 [media] radio-keene: fix sparse warning
drivers/media/radio/radio-keene.c:126:45: warning: dubious: !x | y

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-15 13:00:04 -03:00