1. 21 Dec, 2016 3 commits
  2. 12 Dec, 2016 6 commits
    • Laurent Pinchart's avatar
      [media] v4l: tvp5150: Add missing break in set control handler · d183e4ef
      Laurent Pinchart authored
      A break is missing resulting in the hue control enabling or disabling
      the decode completely. Fix it.
      
      Fixes: c43875f6 ("[media] tvp5150: replace MEDIA_ENT_F_CONN_TEST by a control")
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      d183e4ef
    • Laurent Pinchart's avatar
      [media] v4l: tvp5150: Don't inline the tvp5150_selmux() function · 6e98bee2
      Laurent Pinchart authored
      The function is large and called in several places, don't inline it.
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      6e98bee2
    • Laurent Pinchart's avatar
      [media] v4l: tvp5150: Compile tvp5150_link_setup out if !CONFIG_MEDIA_CONTROLLER · 406ff67d
      Laurent Pinchart authored
      The function is only referenced as a handler in the tvp5150_sd_media_ops
      structure, which is only used when CONFIG_MEDIA_CONTROLLER is set. Don't
      define the function and the structure when the configuration option is
      unset to avoid an unused function warning.
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      406ff67d
    • Mauro Carvalho Chehab's avatar
      [media] em28xx: don't store usb_device at struct em28xx · c6d48134
      Mauro Carvalho Chehab authored
      Now that we're storing usb_interface at em28xx struct,
      there's no good reason to keep storing usb_device, as we can
      get it from usb_interface. So, get rid of it.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      c6d48134
    • Mauro Carvalho Chehab's avatar
      [media] em28xx: use usb_interface for dev_foo() calls · 29b05e22
      Mauro Carvalho Chehab authored
      The usb_device->dev is not the right device for dev_foo() calls.
      Instead, it should use usb_interface->dev.
      Tested-by: default avatarAntti Palosaari <crope@iki.fi>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      29b05e22
    • Mauro Carvalho Chehab's avatar
      [media] em28xx: don't change the device's name · ea48c368
      Mauro Carvalho Chehab authored
      Changing the device name, causes it to be unable to remove the
      sysfs file, causing troubles if a device is removed and then
      re-inserted.
      
      [ 1010.310320] WARNING: CPU: 3 PID: 119 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x7b/0x90
      [ 1010.310323] sysfs: cannot create duplicate filename '/bus/usb/devices/1-3.3'
      [ 1010.310325] Modules linked in: lgdt330x em28xx_dvb dvb_core em28xx_alsa tuner_xc2028 tuner tvp5150 em28xx_v4l videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core em28xx tveeprom v4l2_common videodev media xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp tun bridge stp llc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables cmac bnep cpufreq_powersave cpufreq_conservative cpufreq_userspace binfmt_misc parport_pc ppdev lp parport snd_hda_codec_hdmi iTCO_wdt snd_hda_codec_realtek iTCO_vendor_support snd_hda_codec_generic arc4 intel_rapl x86_pkg_temp_thermal iwlmvm intel_powerclamp coretemp kvm_intel mac80211 kvm i915
      [ 1010.310383]  irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel iwlwifi pl2303 aesni_intel btusb aes_x86_64 usbserial lrw btrtl gf128mul glue_helper btbcm ablk_helper cryptd btintel bluetooth drm_kms_helper cfg80211 drm psmouse pcspkr i2c_i801 e1000e serio_raw snd_hda_intel snd_soc_rt5640 snd_hda_codec snd_soc_rl6231 snd_soc_ssm4567 mei_me i2c_smbus rfkill snd_hda_core ptp mei snd_soc_core ehci_pci sg lpc_ich shpchp mfd_core ehci_hcd pps_core snd_hwdep i2c_algo_bit snd_compress snd_pcm sdhci_acpi snd_timer battery snd sdhci elan_i2c snd_soc_sst_acpi mmc_core fjes dw_dmac i2c_hid soundcore snd_soc_sst_match i2c_designware_platform video i2c_designware_core acpi_pad acpi_als kfifo_buf tpm_tis button industrialio tpm_tis_core tpm ext4 crc16 jbd2 fscrypto mbcache dm_mod joydev evdev hid_logitech_hidpp
      [ 1010.310449]  sd_mod hid_logitech_dj usbhid hid ahci libahci crc32c_intel libata xhci_pci xhci_hcd scsi_mod usbcore fan thermal
      [ 1010.310464] CPU: 3 PID: 119 Comm: kworker/3:2 Not tainted 4.9.0-rc8+ #14
      [ 1010.310466] Hardware name:                  /NUC5i7RYB, BIOS RYBDWi35.86A.0350.2015.0812.1722 08/12/2015
      [ 1010.310487] Workqueue: usb_hub_wq hub_event [usbcore]
      [ 1010.310490]  0000000000000000 ffffffff848f56c5 ffff8803b1f7f858 0000000000000000
      [ 1010.310496]  ffffffff8414f8f8 ffff88030000001f ffffed00763eff07 ffff8803b1f7f8f0
      [ 1010.310501]  ffff8803b3ea1e60 0000000000000001 ffffffffffffffef ffff8803b45c6840
      [ 1010.310505] Call Trace:
      [ 1010.310517]  [<ffffffff848f56c5>] ? dump_stack+0x5c/0x77
      [ 1010.310522]  [<ffffffff8414f8f8>] ? __warn+0x168/0x1a0
      [ 1010.310526]  [<ffffffff8414f9e4>] ? warn_slowpath_fmt+0xb4/0xf0
      [ 1010.310529]  [<ffffffff8414f930>] ? __warn+0x1a0/0x1a0
      [ 1010.310534]  [<ffffffff845436c6>] ? kasan_kmalloc+0xa6/0xd0
      [ 1010.310539]  [<ffffffff846ec2fa>] ? kernfs_path_from_node+0x4a/0x60
      [ 1010.310543]  [<ffffffff846f66eb>] ? sysfs_warn_dup+0x7b/0x90
      [ 1010.310547]  [<ffffffff846f6f26>] ? sysfs_do_create_link_sd.isra.2+0xb6/0xd0
      [ 1010.310553]  [<ffffffff84cd5a08>] ? bus_add_device+0x318/0x6b0
      [ 1010.310557]  [<ffffffff846f8693>] ? sysfs_create_groups+0x83/0x110
      [ 1010.310562]  [<ffffffff84ccff87>] ? device_add+0x777/0x1350
      [ 1010.310567]  [<ffffffff84ccf810>] ? device_private_init+0x180/0x180
      [ 1010.310583]  [<ffffffffc00c0f77>] ? usb_new_device+0x707/0x1030 [usbcore]
      [ 1010.310598]  [<ffffffffc00c58c5>] ? hub_event+0x1d65/0x3280 [usbcore]
      [ 1010.310604]  [<ffffffff841eb4ab>] ? account_entity_dequeue+0x30b/0x4a0
      [ 1010.310618]  [<ffffffffc00c3b60>] ? hub_port_debounce+0x280/0x280 [usbcore]
      [ 1010.310624]  [<ffffffff8407ccd0>] ? compat_start_thread+0x80/0x80
      [ 1010.310629]  [<ffffffff851f5cb4>] ? __schedule+0x704/0x1770
      [ 1010.310633]  [<ffffffff851f55b0>] ? io_schedule_timeout+0x390/0x390
      [ 1010.310638]  [<ffffffff84541783>] ? cache_reap+0x173/0x200
      [ 1010.310642]  [<ffffffff84197bed>] ? process_one_work+0x4ed/0xe60
      [ 1010.310646]  [<ffffffff84198642>] ? worker_thread+0xe2/0xfd0
      [ 1010.310650]  [<ffffffff8421f76c>] ? __wake_up_common+0xbc/0x160
      [ 1010.310654]  [<ffffffff84198560>] ? process_one_work+0xe60/0xe60
      [ 1010.310658]  [<ffffffff841a837c>] ? kthread+0x1cc/0x220
      [ 1010.310663]  [<ffffffff841a81b0>] ? kthread_park+0x80/0x80
      [ 1010.310667]  [<ffffffff841a81b0>] ? kthread_park+0x80/0x80
      [ 1010.310671]  [<ffffffff841a81b0>] ? kthread_park+0x80/0x80
      [ 1010.310675]  [<ffffffff852016f5>] ? ret_from_fork+0x25/0x30
      Tested-by: default avatarAntti Palosaari <crope@iki.fi>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      ea48c368
  3. 01 Dec, 2016 3 commits
  4. 30 Nov, 2016 9 commits
  5. 29 Nov, 2016 4 commits
  6. 25 Nov, 2016 7 commits
    • Arnd Bergmann's avatar
      [media] DaVinci-VPFE-Capture: fix error handling · d3d83ee2
      Arnd Bergmann authored
      A recent cleanup had the right idea to remove the initialization
      of the error variable, but missed the actual benefit of that,
      which is that we get warnings if there is a bug in it. Now
      we get a warning about a bug that was introduced by this cleanup:
      
      drivers/media/platform/davinci/vpfe_capture.c: In function 'vpfe_probe':
      drivers/media/platform/davinci/vpfe_capture.c:1992:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      This adds the missing initialization that the warning is about,
      and another one that was preexisting and that we did not get
      a warning for. That second bug has existed since the driver
      was first added.
      
      Fixes: efb74461 ("[media] DaVinci-VPFE-Capture: Delete an unnecessary variable initialisation in vpfe_probe()")
      Fixes: 7da8a6cb ("V4L/DVB (12248): v4l: vpfe capture bridge driver for DM355 and DM6446")
      
      [mchehab@s-opensource.com: fix a merge conflict]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      d3d83ee2
    • Mauro Carvalho Chehab's avatar
      [media] cx88: make checkpatch.pl happy · 399426ca
      Mauro Carvalho Chehab authored
      Usually, I don't like fixing coding style issues on non-staging
      drivers, as it could be a mess pretty easy, and could become like
      a snow ball. That's the case of recent changes on two changesets:
      they disalign some statements. Yet, a care a lot with cx88 driver,
      as it was the first driver I touched at the Kernel, and I've been
      maintaining it since 2005. So, several of the coding style issues
      were due to my code.
      
      Per Andrey's suggestion, I ran checkpatch.pl in strict mode, with
      fixed several other issues, did some function alinments, but broke
      other alinments.
      
      So, I had to manually apply another round of manual fixes to make
      sure that everything is ok, and to make checkpatch happy with
      this patch.
      
      With this patch, checkpatch.pl is now happy when called with:
      	./scripts/checkpatch.pl -f --max-line-length=998 --ignore PREFER_PR_LEVEL
      
      Also, the 80-cols violations that made sense were fixed.
      
      Checkpatch would be happier if we convert it to use dev_foo(),
      but this is a more complex change.
      
      NOTE: there are some places with msleep(1). As this driver was
      written at the time that the default was to sleep at least 10ms
      on such calls (e. g. CONFIG_HZ=100), I replaced those calls by
      usleep_range(10000, 20000), with should be safe to avoid breakages.
      
      Fixes: 65bc2fe8 ("[media] cx88: convert it to use pr_foo() macros")
      Fixes: 7b61ba8f ("[media] cx88: make checkpatch happier")
      Suggested-by: default avatarAndrey Utkin <andrey_utkin@fastmail.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Reviewed-by: default avatarAndrey Utkin <andrey_utkin@fastmail.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      399426ca
    • Arnd Bergmann's avatar
      [media] v4l: rcar_fdp1: add FCP dependency · 1d389714
      Arnd Bergmann authored
      Commit 4710b752 ("[media] v4l: Add Renesas R-Car FDP1 Driver") in the
      v4l-dvb tree adds CONFIG_VIDEO_RENESAS_FDP1.
      
      It calls into the FCP driver, but when there is no dependency, FCP might
      be a module while FDP1 is built-in.
      
      We have the same logic in VIDEO_RENESAS_VSP1, which also depends on
      FCP not being a module when it is built-in itself.
      
      drivers/media/platform/rcar_fdp1.o: In function `fdp1_pm_runtime_resume':
      rcar_fdp1.c:(.text.fdp1_pm_runtime_resume+0x78): undefined reference to `rcar_fcp_enable'
      drivers/media/platform/rcar_fdp1.o: In function `fdp1_pm_runtime_suspend':
      rcar_fdp1.c:(.text.fdp1_pm_runtime_suspend+0x14): undefined reference to `rcar_fcp_disable'
      drivers/media/platform/rcar_fdp1.o: In function `fdp1_probe':
      rcar_fdp1.c:(.text.fdp1_probe+0x15c): undefined reference to `rcar_fcp_get'
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      1d389714
    • Arnd Bergmann's avatar
      [media] v4l: rcar_fdp1: mark PM functions as __maybe_unused · fa4a2fd1
      Arnd Bergmann authored
      The new driver produces a warning when CONFIG_PM is disabled:
      
      platform/rcar_fdp1.c:2408:12: error: 'fdp1_pm_runtime_resume' defined but not used [-Werror=unused-function]
      platform/rcar_fdp1.c:2399:12: error: 'fdp1_pm_runtime_suspend' defined but not used [-Werror=unused-function]
      
      This marks the two functions as __maybe_unused.
      
      Fixes: 4710b752 ("[media] v4l: Add Renesas R-Car FDP1 Driver")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      fa4a2fd1
    • Shuah Khan's avatar
      [media] media: remove obsolete Media Device Managed resource interfaces · 8c2ebcf1
      Shuah Khan authored
      Remove obsolete media_device_get_devres(), media_device_find_devres(),
      and media_device_release_devres() interfaces. These interfaces are now
      obsolete.
      Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      8c2ebcf1
    • Mauro Carvalho Chehab's avatar
      [media] dvb-net: split the logic at dvb_net_ule() into other functions · 8b0041db
      Mauro Carvalho Chehab authored
      This function is too big and too complex, making really hard
      to understand what's there.
      
      Split it into sub-routines, in order to make it easier to be
      understood, and to allow gcc to better parse it.
      
      As a bonus, it gets rid of a goto in the middle of a routine.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      8b0041db
    • Mauro Carvalho Chehab's avatar
      [media] dvb_net: prepare to split a very complex function · efb9ab67
      Mauro Carvalho Chehab authored
      The dvb_net code has a really complex function, meant to handle
      DVB network packages: it is long, has several loops and ifs
      inside, and even cause warnings with gcc5.
      
      Prepare it to be split into smaller functions by storing all
      arguments and internal vars inside a struct.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      efb9ab67
  7. 23 Nov, 2016 8 commits