summaryrefslogtreecommitdiff
path: root/drivers/staging
AgeCommit message (Collapse)Author
2013-08-11zram: avoid access beyond the zram deviceJiang Liu
commit 12a7ad3b810e77137d0caf97a6dd97591e075b30 upstream. Function valid_io_request() should verify the entire request are within the zram device address range. Otherwise it may cause invalid memory access when accessing/modifying zram->meta->table[index] because the 'index' is out of range. Then it may access non-exist memory, randomly modify memory belong to other subsystems, which is hard to track down. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-11zram: avoid double free in function zram_bvec_write()Jiang Liu
commit 65c484609a3b25c35e4edcd5f2c38f98f5226093 upstream. When doing a patial write and the whole page is filled with zero, zram_bvec_write() will free uncmem twice. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-11zram: destroy all devices on error recovery path in zram_init()Jiang Liu
commit 39a9b8ac9333e4268ecff7da6c9d1ab3823ff243 upstream. On error recovery path of zram_init(), it leaks the zram device object causing the failure. So change create_device() to free allocated resources on error path. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Acked-by: Minchan Kim <minchan@kernel.org> Acked-by: Jerome Marchand <jmarchan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-11zram: use zram->lock to protect zram_free_page() in swap free notify pathJiang Liu
commit 57ab048532c0d975538cebd4456491b5c34248f4 upstream. zram_slot_free_notify() is free-running without any protection from concurrent operations. So there are race conditions between zram_bvec_read()/zram_bvec_write() and zram_slot_free_notify(), and possible consequences include: 1) Trigger BUG_ON(!handle) on zram_bvec_write() side. 2) Access to freed pages on zram_bvec_read() side. 3) Break some fields (bad_compress, good_compress, pages_stored) in zram->stats if the swap layer makes concurrently call to zram_slot_free_notify(). So enhance zram_slot_free_notify() to acquire writer lock on zram->lock before calling zram_free_page(). Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-11zram: avoid invalid memory access in zram_exit()Jiang Liu
commit 6030ea9b35971a4200062f010341ab832e878ac9 upstream. Memory for zram->disk object may have already been freed after returning from destroy_device(zram), then it's unsafe for zram_reset_device(zram) to access zram->disk again. We can't solve this bug by flipping the order of destroy_device(zram) and zram_reset_device(zram), that will cause deadlock issues to the zram sysfs handler. So fix it by holding an extra reference to zram->disk before calling destroy_device(zram). Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: android: logger: Correct write offset reset on errorKarlis Ogsts
commit 72bb99cfe9c57d2044445fb34bbc95b4c0bae6f2 upstream. In the situation that a writer fails to copy data from userspace it will reset the write offset to the value it had before it went to sleep. This discarding any messages written while aquiring the mutex. Therefore the reset offset needs to be retrieved after acquiring the mutex. Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: comedi: COMEDI_CANCEL ioctl should wake up read/writeIan Abbott
commit 69acbaac303e8cb948801a9ddd0ac24e86cc4a1b upstream. Comedi devices can do blocking read() or write() (or poll()) if an asynchronous command has been set up, blocking for data (for read()) or buffer space (for write()). Various events associated with the asynchronous command will wake up the blocked reader or writer (or poller). It is also possible to force the asynchronous command to terminate by issuing a `COMEDI_CANCEL` ioctl. That shuts down the asynchronous command, but does not currently wake up the blocked reader or writer (or poller). If the blocked task could be woken up, it would see that the command is no longer active and return. The caller of the `COMEDI_CANCEL` ioctl could attempt to wake up the blocked task by sending a signal, but that's a nasty workaround. Change `do_cancel_ioctl()` to wake up the wait queue after it returns from `do_cancel()`. `do_cancel()` can propagate an error return value from the low-level comedi driver's cancel routine, but it always shuts the command down regardless, so `do_cancel_ioctl()` can wake up he wait queue regardless of the return value from `do_cancel()`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: comedi: fix a race between do_cmd_ioctl() and read/writeIan Abbott
commit 4b18f08be01a7b3c7b6df497137b6e3cb28adaa3 upstream. `do_cmd_ioctl()` is called with the comedi device's mutex locked to process the `COMEDI_CMD` ioctl to set up comedi's asynchronous command handling on a comedi subdevice. `comedi_read()` and `comedi_write()` are the `read` and `write` handlers for the comedi device, but do not lock the mutex (for performance reasons, as some things can hold the mutex for quite a long time). There is a race condition if `comedi_read()` or `comedi_write()` is running at the same time and for the same file object and comedi subdevice as `do_cmd_ioctl()`. `do_cmd_ioctl()` sets the subdevice's `busy` pointer to the file object way before it sets the `SRF_RUNNING` flag in the subdevice's `runflags` member. `comedi_read() and `comedi_write()` check the subdevice's `busy` pointer is pointing to the current file object, then if the `SRF_RUNNING` flag is not set, will call `do_become_nonbusy()` to shut down the asyncronous command. Bad things can happen if the asynchronous command is being shutdown and set up at the same time. To prevent the race, don't set the `busy` pointer until after the `SRF_RUNNING` flag has been set. Also, make sure the mutex is held in `comedi_read()` and `comedi_write()` while calling `do_become_nonbusy()` in order to avoid moving the race condition to a point within that function. Change some error handling `goto cleanup` statements in `do_cmd_ioctl()` to simple `return -ERRFOO` statements as a result of changing when the `busy` pointer is set. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25staging: line6: Fix unlocked snd_pcm_stop() callTakashi Iwai
commit 86f0b5b86d142b9323432fef078a6cf0fb5dda74 upstream. snd_pcm_stop() must be called in the PCM substream lock context. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Series of fixes for 3.10. There are some usual driver fixes (mostly on s5p/exynos playform drivers), plus some fixes at V4L2 core" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (40 commits) [media] soc_camera: error dev remove and v4l2 call [media] sh_veu: fix the buffer size calculation [media] sh_veu: keep power supply until the m2m context is released [media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted [media] v4l2-ioctl: don't print the clips list [media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls [media] cx88: fix NULL pointer dereference [media] DocBook/media/v4l: update version number [media] exynos4-is: Remove "sysreg" clock handling [media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev [media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured [media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded [media] s5p-mfc: Add NULL check for allocated buffer [media] s5p-mfc: added missing end-of-lines in debug messages [media] s5p-mfc: v4l2 controls setup routine moved to initialization code [media] s5p-mfc: separate encoder parameters for h264 and mpeg4 [media] s5p-mfc: Remove special clock usage in driver [media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function [media] v4l2: mem2mem: save irq flags correctly [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support ...
2013-06-06Merge tag 'staging-3.10-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg Kroah-Hartman: "Here are some staging and IIO driver fixes for the 3.10-rc5 release. All of them are tiny, and fix a number of reported issues (build and runtime)" Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> * tag 'staging-3.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio:inkern: Fix typo/bug in convert raw to processed. iio: frequency: ad4350: Fix bug / typo in mask inkern: iio_device_put after incorrect return/goto staging: alarm-dev: information leak in alarm_compat_ioctl() iio:callback buffer: free the scan_mask staging: alarm-dev: information leak in alarm_ioctl() drivers: staging: zcache: fix compile error staging: dwc2: fix value of dma_mask
2013-06-04staging: alarm-dev: information leak in alarm_compat_ioctl()Dan Carpenter
If we pass an invalid clock type then "ts" is never set. We need to check for errors earlier, otherwise we end up passing uninitialized stack data to userspace. Reported-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03staging: alarm-dev: information leak in alarm_ioctl()Dan Carpenter
Smatch complains that if we pass an invalid clock type then "ts" is never set. We need to check for errors earlier, otherwise we end up passing uninitialized stack data to userspace. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30drivers: staging: zcache: fix compile errorBob Liu
Fix below compile error: drivers/built-in.o: In function `zcache_pampd_free': >> zcache-main.c:(.text+0xb1c8a): undefined reference to `ramster_pampd_free' >> zcache-main.c:(.text+0xb1cbc): undefined reference to `ramster_count_foreign_pages' drivers/built-in.o: In function `zcache_pampd_get_data_and_free': >> zcache-main.c:(.text+0xb1f05): undefined reference to `ramster_count_foreign_pages' drivers/built-in.o: In function `zcache_cpu_notifier': >> zcache-main.c:(.text+0xb228d): undefined reference to `ramster_cpu_up' >> zcache-main.c:(.text+0xb2339): undefined reference to `ramster_cpu_down' drivers/built-in.o: In function `zcache_pampd_create': >> (.text+0xb26ce): undefined reference to `ramster_count_foreign_pages' drivers/built-in.o: In function `zcache_pampd_create': >> (.text+0xb27ef): undefined reference to `ramster_count_foreign_pages' drivers/built-in.o: In function `zcache_put_page': >> (.text+0xb299f): undefined reference to `ramster_do_preload_flnode' drivers/built-in.o: In function `zcache_flush_page': >> (.text+0xb2ea3): undefined reference to `ramster_do_preload_flnode' drivers/built-in.o: In function `zcache_flush_object': >> (.text+0xb307c): undefined reference to `ramster_do_preload_flnode' drivers/built-in.o: In function `zcache_init': >> zcache-main.c:(.text+0xb3629): undefined reference to `ramster_register_pamops' >> zcache-main.c:(.text+0xb3868): undefined reference to `ramster_init' >> drivers/built-in.o:(.rodata+0x15058): undefined reference to `ramster_foreign_eph_pages' >> drivers/built-in.o:(.rodata+0x15078): undefined reference to `ramster_foreign_pers_pages' Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bob Liu <bob.liu@oracle.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: dwc2: fix value of dma_maskPaul Zimmerman
Passing the value DMA_BIT_MASK(31) to dma_set_mask() causes the dwc2-pci driver to sometimes fail (cannot enumerate the connected device). Change it to DMA_BIT_MASK(32) instead, which is a more sensible value anyway. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-27[media] staging/solo6x10: select the desired fontXiong Zhou
Make sure FONT_8x16 can be found by find_font(). Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-27[media] drivers/staging: davinci: vpfe: fix dependency for building the driverLad, Prabhakar
from commit 3778d05036cc7ddd983ae2451da579af00acdac2 [media: davinci: kconfig: fix incorrect selects] VIDEO_VPFE_CAPTURE was removed but there was a negative dependancy for building the DM365 VPFE MC based capture driver (VIDEO_DM365_VPFE), This patch fixes this dependency by replacing the VIDEO_VPFE_CAPTURE with VIDEO_DM365_ISIF, so as when older DM365 ISIF v4l driver is selected the newer media controller driver for DM365 isnt visible. Reported-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-24Merge remote-tracking branch 'pfdo/drm-fixes' into drm-nextDave Airlie
Pull the vblank event changes into a Linus master tree to make merging easier.
2013-05-23Merge tag 'staging-3.10-rc2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg Kroah-Hartman: "Here are some staging tree driver fixes for 3.10-rc2 The drivers/iio/ changes are here as they are still tied into drivers/staging/iio/. Nothing major, just a number of small bugfixes, and a larger documentation update for the ramster code." * tag 'staging-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (28 commits) staging: dwc2: remove compile warning for USB_DWC2_TRACK_MISSED_SOFS iio: exynos_adc: fix wrong structure extration in suspend and resume iio:common:st: added disable function after read info raw data iio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m staging:iio:light:tsl2x7x: fix the error handling in tsl2x7x_probe() staging/iio/mxs-lradc: fix preenable for multiple buffers staging: imx-drm: imx-tve: Check the return value of 'regulator_enable()' staging: video: imx: Select VIDEOMODE_HELPERS for parallel display staging: ramster: add how-to document staging: dwc2: Fix dma-enabled platform devices using a default dma_mask staging: vt6656: [bug] Fix missing spin lock in iwctl_siwpower. staging: Swap zram and zsmalloc in Kconfig staging: android: logger: use kuid_t instead of uid_t staging: zcache: Fix incorrect module_param_array types staging/solo6x10: depend on CONFIG_FONTS staging/drm: imx: add missing dependencies staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning staging: sep: fix driver build and kconfig staging: nvec: cleanup childs on remove staging: nvec: implement unregistering of notifiers ...
2013-05-23Merge tag 'usb-3.10-rc2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg Kroah-Hartman: "Here are a number of tiny USB bugfixes / new device ids for 3.10-rc2 The majority of these are USB gadget fixes, but they are all small. Other than that, some USB host controller fixes, and USB serial driver fixes for problems reported with them. Also hopefully a fixed up USB_OTG Kconfig dependancy, that one seems to be almost impossible to get right for all of the different platforms these days." * tag 'usb-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (56 commits) USB: cxacru: potential underflow in cxacru_cm_get_array() USB: ftdi_sio: Add support for Newport CONEX motor drivers USB: option: add device IDs for Dell 5804 (Novatel E371) WWAN card usb: ohci: fix goto wrong tag in err case usb: isp1760-if: fix memleak when platform_get_resource fail usb: ehci-s5p: fix memleak when fallback to pdata USB: serial: clean up chars_in_buffer USB: ti_usb_3410_5052: fix chars_in_buffer overhead USB: io_ti: fix chars_in_buffer overhead USB: ftdi_sio: fix chars_in_buffer overhead USB: ftdi_sio: clean up get_modem_status USB: serial: add generic wait_until_sent implementation USB: serial: add wait_until_sent operation USB: set device dma_mask without reference to global data USB: Blacklisted Cinterion's PLxx WWAN Interface usb: option: Add Telewell TW-LTE 4G USB: EHCI: remove bogus #error USB: reset resume quirk needed by a hub USB: usb-stor: realtek_cr: Fix compile error usb, chipidea: fix link error when USB_EHCI_HCD is a module ...
2013-05-22staging: dwc2: remove compile warning for USB_DWC2_TRACK_MISSED_SOFSPaul Zimmerman
Remove the compile-time warning for this config option, and instead warn that it is experimental in the Kconfig text Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22staging:iio:light:tsl2x7x: fix the error handling in tsl2x7x_probe()Wei Yongjun
Fix to return -EINVAL in the i2c device found error handling case instead of 0, as done elsewhere in this function. And also correct the fail1 and fail2 lable to do the right thing. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-05-22staging/iio/mxs-lradc: fix preenable for multiple buffersMichał Mirosław
This fixes 'preenable failed: -EINVAL' error when using this driver. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-05-22drm/imx: use drm_send_vblank_event() helperRob Clark
Also, slightly changes the behavior to always put the vblank irq, even if userspace did not request a vblank event. As far as I can tell, the previous code would leak a vblank irq refcnt if userspace requested a pageflip without event. Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-05-21staging: imx-drm: imx-tve: Check the return value of 'regulator_enable()'Fabio Estevam
Since commit c8801a8 (regulator: core: Mark all get and enable calls as __must_check) we need to check the value returned by 'regulator_enable()'. Do this check to get rid of the following build warning: drivers/staging/imx-drm/imx-tve.c: In function 'imx_tve_probe': drivers/staging/imx-drm/imx-tve.c:671:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21staging: video: imx: Select VIDEOMODE_HELPERS for parallel displayMarek Vasut
Without this, I get the following problem when building kernel: drivers/built-in.o: In function `imx_pd_connector_get_modes': /linux-2.6/drivers/staging/imx-drm/parallel-display.c:78: undefined reference to `of_get_drm_display_mode' make: *** [vmlinux] Error 1 Signed-off-by: Marek Vasut <marex@denx.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21[media] davinci: vpfe: fix error return code in vpfe_probe()Wei Yongjun
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-20staging: ramster: add how-to documentDan Magenheimer
Add how-to documentation that provides a step-by-step guide for configuring and trying out a ramster cluster. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-18drivers/staging/nvec: don't check resource with devm_ioremap_resourceWolfram Sang
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-05-18drivers/staging/dwc2: don't check resource with devm_ioremap_resourceWolfram Sang
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-05-17staging: dwc2: Fix dma-enabled platform devices using a default dma_maskMatthijs Kooijman
Platform devices added through OF usually do not have any dma_mask pointer set. If the hardware advertises DMA support, the driver will expect DMA buffers to be passed in, but the USB core will not do this due to lack of a dma mask, breaking all connectiviy. To fix this, set a default dma_mask by pointing it at the coherent_dma_mask and set their value to a 32 bit mask. This still allows any platform code to set any more specific mask if needed, but makes the driver work for most dma-enabled hardware. It would be great if this patch could be included in 3.10, since it is needed to make the dwc2 driver work on the ralink rt3052 target. Before, the plan was to set up the dma mask in MIPS platform code, but because of a similar change in ehci and the uglyness of the code for that, the plan for that infrastructure was dropped. This patch makes the setting of the dma_mask happen in the same way as the patch Stephen Warren (set device dma_mask without reference to global data). Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: vt6656: [bug] Fix missing spin lock in iwctl_siwpower.Malcolm Priestley
Fixes occasional dead lock on power up / down. spin_lock_irq is used because of unlocking with spin_unlock_irq elsewhere in the driver. Only relevant to kernels 3.8 and later when command was transferred to the iw_handler. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: stable@vger.kernel.org # 3.8+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: Swap zram and zsmalloc in KconfigJean Delvare
ZRAM support depends on ZSMALLOC so present ZSMALLOC to the user first. Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: android: logger: use kuid_t instead of uid_tXiong Zhou
Use kuid_t instead of uid_t, to pass the UIDGID_STRICT_TYPE_CHECKS. Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: zcache: Fix incorrect module_param_array typesGeert Uytterhoeven
drivers/staging/zcache/zcache-main.c: In function ‘__check_disable_cleancache’: drivers/staging/zcache/zcache-main.c:1928: warning: return from incompatible pointer type drivers/staging/zcache/zcache-main.c: In function ‘__check_disable_frontswap’: drivers/staging/zcache/zcache-main.c:1929: warning: return from incompatible pointer type drivers/staging/zcache/zcache-main.c: In function ‘__check_disable_frontswap_ignore_nonactive’: drivers/staging/zcache/zcache-main.c:1933: warning: return from incompatible pointer type Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/solo6x10: depend on CONFIG_FONTSArnd Bergmann
The new SOLO6X10 driver needs the built-in console fonts, specifically the VGA8x16 font and building it without console support results in a link error error. drivers/built-in.o: In function `solo_osd_print': :(.text+0x7d3424): undefined reference to `find_font' This adds a dependency on the CONFIG_FONTS symbol and changes the console code to always build the base driver even if there are no specific fonts built-in. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/drm: imx: add missing dependenciesArnd Bergmann
The imx DRM driver needs a couple of extra Kconfig dependencies to avoid random build failures: drivers/staging/imx-drm/ipuv3-crtc.c:448: undefined reference to `ipu_idmac_put' drivers/staging/imx-drm/ipuv3-crtc.c:450: undefined reference to `ipu_dmfc_put' drivers/staging/imx-drm/ipuv3-crtc.c:452: undefined reference to `ipu_dp_put' drivers/staging/imx-drm/ipuv3-crtc.c:454: undefined reference to `ipu_di_put' drivers/built-in.o: In function `ipu_probe': :(.text+0x4b4174): undefined reference to `device_reset' drivers/built-in.o: In function `imx_tve_probe': drivers/staging/imx-drm/imx-tve.c:648: undefined reference to `devm_regmap_init_mmio_clk' drivers/built-in.o: In function `imx_pd_connector_get_modes': drivers/staging/imx-drm/parallel-display.c:78: undefined reference to `of_get_drm_display_mode' Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' ↵Lee Jones
warning drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c: In function ‘synaptics_rmi4_resume’: drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c:1090:18: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result [-Wunused-result Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: devel@driverdev.osuosl.org Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: sep: fix driver build and kconfigRandy Dunlap
Fix build errors in staging/sep/ by making DX_SEP depend on CRYPTO. drivers/built-in.o: In function `sep_sha1_init': sep_crypto.c:(.text+0x245ece): undefined reference to `crypto_enqueue_request' drivers/built-in.o: In function `sep_sha1_update': sep_crypto.c:(.text+0x245f4f): undefined reference to `crypto_enqueue_request' drivers/built-in.o: In function `sep_sha1_final': sep_crypto.c:(.text+0x245fcf): undefined reference to `crypto_enqueue_request' drivers/built-in.o: In function `sep_sha1_finup': sep_crypto.c:(.text+0x24604f): undefined reference to `crypto_enqueue_request' drivers/built-in.o: In function `sep_sha1_digest': sep_crypto.c:(.text+0x2460de): undefined reference to `crypto_enqueue_request' drivers/built-in.o:sep_crypto.c:(.text+0x24616e): more undefined references to `crypto_enqueue_request' follow drivers/built-in.o: In function `sep_crypto_block': sep_crypto.c:(.text+0x247c81): undefined reference to `ablkcipher_walk_phys' sep_crypto.c:(.text+0x247e40): undefined reference to `ablkcipher_walk_phys' drivers/built-in.o: In function `sep_dequeuer': sep_crypto.c:(.text+0x248ab9): undefined reference to `crypto_dequeue_request' sep_crypto.c:(.text+0x248afa): undefined reference to `crypto_ahash_type' sep_crypto.c:(.text+0x248fdf): undefined reference to `crypto_dequeue_request' drivers/built-in.o: In function `sep_crypto_setup': (.text+0x24902a): undefined reference to `crypto_init_queue' drivers/built-in.o: In function `sep_crypto_setup': (.text+0x24909c): undefined reference to `crypto_register_ahash' drivers/built-in.o: In function `sep_crypto_setup': (.text+0x2490c4): undefined reference to `crypto_register_alg' drivers/built-in.o: In function `sep_crypto_setup': (.text+0x2490f7): undefined reference to `crypto_unregister_alg' drivers/built-in.o: In function `sep_crypto_setup': (.text+0x249118): undefined reference to `crypto_unregister_ahash' drivers/built-in.o: In function `sep_crypto_takedown': (.text+0x249176): undefined reference to `crypto_unregister_ahash' drivers/built-in.o: In function `sep_crypto_takedown': (.text+0x249197): undefined reference to `crypto_unregister_alg' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-15USB: remove remaining instances of USB_SUSPENDAlan Stern
Commit 84ebc10294a3d7be4c66f51070b7aedbaa24de9b (USB: remove CONFIG_USB_SUSPEND option) failed to remove all of the usages of USB_SUSPEND throughout the kernel. This patch (as1677) removes the remaining instances of that symbol. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-15usb: phy: remove CONFIG_USB_OTG_UTILS once morePaul Bolle
The Kconfig symbol USB_OTG_UTILS was removed in the v3.10 merge window, in commit fd89149875 ("usb: phy: remove CONFIG_USB_OTG_UTILS"). But that symbol popped up again in a few places. Remove it there too. Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-14staging: nvec: cleanup childs on removeMarc Dietrich
Disable device functions and unregister notifier if available. The serio device must not be "kzallocated". Otherwise serio_unregister_port will fail because the device is already freed. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-14staging: nvec: implement unregistering of notifiersMarc Dietrich
This implements the unregistering of notifiers so kernel modules can be unloaded. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-14staging: nvec: add missing module aliasesMarc Dietrich
Keyboard and mouse drivers were missing MODULE_ALIAS definitions. This fixes auto module loading of these drivers. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13staging: nvec: remove inline marking of EXPORT_SYMBOL functionsDenis Efremov
EXPORT_SYMBOL and inline directives are contradictory to each other. The patch fixes this inconsistency. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Denis Efremov <yefremov.denis@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13staging: comedi: complain if dma buffer allocation not supportedIan Abbott
When allocating a buffer to support asynchronous comedi commands, if a DMA coherent buffer was requested but `CONFIG_HAS_DMA` is undefined, bail out of local helper function `__comedi_buf_alloc()` with an error message. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13staging: comedi: ni_mio_common: only do counter commands for ni_pcimioIan Abbott
"ni_mio_common.c" holds common code included by "ni_pcimio.c", "ni_atmio.c" and "ni_mio_cs.c", including a common initialization function `ni_E_init()`. Amongst other things, this initializes some counter subdevices to support comedi instructions and asynchronous commands. However, even though it sets up the handlers to support asynchronous commands on these subdevices, the handlers will return an error unless the `PCIDMA` macro is defined (which is defined only in "ni_pcimio.c"). If the `PCIDMA` macro is not defined, the comedi core will needlessly allocate buffers to support the asynchronous commands. Also, `s->async_dma_dir` is set to `DMA_BIDIRECTIONAL`, causing the physical pages for the buffers to be allocated using `dma_alloc_coherent()`. If the comedi core cannot call `dma_alloc_coherent()` because `CONFIG_HAS_DMA` is not defined, it will fail to allocate the buffers, which ultimately causes `ni_E_init()` to fail. Avoid the wastage and prevent the failure by only setting up asynchronous command support for the counter subdevices if the `PCIDMA` macro is defined. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13staging: comedi: work without HAS_DMAIan Abbott
The core "comedi" module and the "mite" helper module for NI PCI devices both have calls to `dma_alloc_coherent()` and `dma_free_coherent()`. Those functions are only available if `CONFIG_HAS_DMA` is defined. Apart from the "mite" module, the functions are only called for comedi drivers that set `s->async_dma_dir` (where `s` is a pointer to a `struct comedi_subdevice`) to anything other than `DMA_NONE`. Change local helper functions `__comedi_buf_alloc()` and `__comedi_buf_free()` to only call `dma_alloc_coherent()` and `dma_free_coherent()` if `CONFIG_HAS_DMA` is defined. Change the "Kconfig" to make the following configuration options depend on `HAS_DMA`: `COMEDI_MITE` - builds the "mite" module. `COMEDI_NI_6527` - selects `COMEDI_MITE`. `COMEDI_NI_65XX` - selects `COMEDI_MITE`. `COMEDI_NI_670X` - selects `COMEDI_MITE`. `COMEDI_NI_LABPC_PCI` - selects `COMEDI_MITE`. `COMEDI_NI_PCIDIO` - selects `COMEDI_MITE`. `COMEDI_NI_TIOCMD` - selects `COMEDI_MITE`. `COMEDI_NI_660X` - selects `COMEDI_NI_TIOCMD`, sets `s->async_dma_dir`. `COMEDI_NI_PCIMIO` - selects `COMEDI_NI_TIOCMD`, sets `s->async_dma_dir`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13staging: comedi: allow buffer resize if previous resize failedIan Abbott
When a comedi device is successfully attached, those subdevices that support asynchronous commands will have had buffers allocated successfully. It is possible to resize the buffers afterwards, but if the resize fails the subdevice is left with no buffer (`s->async->prealloc_buf == NULL`). Currently, this also causes any subsequent attempts to resize the buffer to fail with an error, which seems like a bad idea. Remove the check in `resize_async_buffer()` that causes the resize to fail if the subdevice currently has no buffer (presumably due to the failure of a previous resize attempt). Callers of `resize_async_buffer()` have already checked that the subdevice is allowed to have a buffer. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13staging: comedi: ni_labpc: fix build when VIRT_TO_BUS is not definedH Hartley Sweeten
After merging the final tree, the next-20130424 build (powerpc allyesconfig) failed like this: drivers/staging/comedi/drivers/ni_labpc.c: In function 'labpc_ai_cmd': drivers/staging/comedi/drivers/ni_labpc.c:980:9: error: implicit declaration of function 'virt_to_bus' [-Werror=implicit-function-declaration] The virt_to_bus() is only needed for the ISA DMA support in this driver. On powerpc, CONFIG_COMEDI_NI_LABPC_ISA cannot be enabled due to the depends on VIRT_TO_BUS but the PCI driver, ni_labpc_pci, can be enabled. That driver uses the ni_labpc driver for the common support code shared by the ISA, PCI, and PCMCIA boards. The ISA specific support, and the optional ISA DMA support, are currently still in the common ni_labpc driver. The ISA specific code is protected by #if IS_ENABLED(CONFIG_COMEDI_NI_LABPC_ISA) and the ISA DMA support is protected by #ifdef CONFIG_ISA_DMA_API. This allows the ISA support to be enabled on architectures that support VIRT_TO_BUS and optionally enables ISA DMA support if ISA_DMA_API is enabled. Unfortunately, the ISA DMA code uses virt_to_bus(). This results in the build failure for architectures that enable ISA_DMA_API but do not have VIRT_TO_BUS. Add a new member to the private data, dma_addr, to hold the phys_addr_t returned by virt_to_bus() and initialize it in the ISA specific labpc_attach(). For architectures that enable ISA_DMA_API but not VIRT_TO_BUS, this will fix the build error. This is also safe for architectures the enable both options but don't enable COMEDI_NI_LABPC_ISA because the dma channel (devpriv->dma_chan) is only initialized in the ISA specific labpc_attach(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>