summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)Author
2018-12-17staging: vc04_services: Remove USER_SERVICE_T typedefDominic Braun
Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun <inf.braun@fau.de> Signed-off-by: Tobias Büttner <tobias.buettner@fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: vc04_services: Remove SERVICE_CREATION_T typedefDominic Braun
Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun <inf.braun@fau.de> Signed-off-by: Tobias Büttner <tobias.buettner@fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: vc04_services: Remove REMOTE_EVENT_T typedefDominic Braun
Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun <inf.braun@fau.de> Signed-off-by: Tobias Büttner <tobias.buettner@fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: vc04_services: Remove PAGELIST_T typedefDominic Braun
Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun <inf.braun@fau.de> Signed-off-by: Tobias Büttner <tobias.buettner@fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: vc04_services: Remove DUMP_CONTEXT_T typedefDominic Braun
Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun <inf.braun@fau.de> Signed-off-by: Tobias Büttner <tobias.buettner@fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17Staging: rtl8723bs: Fix code style issue in rtl8723bs driverHardik Singh Rathore
Add space between 'else' and '{' to solve code style issue in all the files for rtl8723bs driver. Signed-off-by: Hardik Singh Rathore <hardiksingh.k@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: greybus: convert to DEFINE_SHOW_ATTRIBUTEYangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: vc04_services: convert to DEFINE_SHOW_ATTRIBUTEYangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: unisys: convert to DEFINE_SHOW_ATTRIBUTEYangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: fwserial: convert to DEFINE_SHOW_ATTRIBUTEYangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: wilc1000: fix NULL dereference inside wilc_scan()Ajay Singh
Added NULL check before accessing 'hidden_net' pointer inside wilc_scan() to fix the issue found by static code checker. Fixes: 8f1a0ac1eba7 ("staging: wilc1000: handle scan operation callback from cfg80211 context") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: vchiq: delete vchiq_killable.hNicolas Saenz Julienne
There are no users for that header file. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: vchiq_2835_arm: quit using custom down_interruptible()Nicolas Saenz Julienne
vchi_killable.h overrides down_interruptible() by implementing a function similar to down_killable(). To make things simpler we turn calls to down_interruptible() into kernel's implementation of down_killable(). Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: vchiq: switch to wait_for_completion_killableNicolas Saenz Julienne
This fixes f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores") as it neglected the subtle down_interruptible() macro override in vchiq_killable.h. Hence all completions should be killable instead of interruptible. Fixes: f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores") Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: bcm2835-audio: double free in init error pathDan Carpenter
We free instance here and in the caller. It should be only the caller which handles it. Fixes: d7ca3a71545b ("staging: bcm2835-audio: Operate non-atomic PCM ops") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: mt7621-dma: fix unbalanced bracesLou Knauer
Add braces to conditional statements if the other branch has them in order to be more compliant with the linux kernel coding style. Remaining checkpatch.pl issues include unnecessary line continuations and use of non-conventional types. Signed-off-by: Lou Knauer <lou.knauer@fau.de> Signed-off-by: Philipp Panzer <philipp.panzer@fau.de> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17Staging: comedi: cb_pcidas: fixed a spelling mistake coding style issueAmir Mahdi Ghorbanian
Fixed a coding style issue. Signed-off-by: Amir Mahdi Ghorbanian <indigoomega021@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13Merge tag 'iio-for-4.21b' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of IIO new device support, features and cleanups for the 4.21 cycle. Staging graduation * ad2s90 - Driver for this resolver to digital chip. New drivers and device support. * ad5686 - Add support for ad5310r DAC and associated fix in value read back. * exynos-adc - Support for S5PV210 which is slightly different from other parts. * mcp41010 - Driver supporting MCP41010, MCP41050, MCP41100, MCP42010, MCP42050 and MCP42100 microchip potentiometers. New ACPI ids. * ak8975 - AKM9911 ACPI HID. * kxcjk-1013 - KXJ2109 ACPI HID. - KIOX010A ACPI HID. New features * ad5933 - Explicit DT binding. * ad2s90 - Explicit DT binding including dropping spi setup that is done via dt in favour of verifying the settings form DT. * adt7316 - Explicit DT binding and support for gpio, irq_flags etc. * stm32-adc - Runtime power management. Minor fixes and cleanups * core - Protect against missing info structure. * ad2s90 - SPDX - Add documentation fo the mutex. * ad7280a - Check allocation failure. - Fix an accidental replacement of an error return. * adt7316 - Switch some variables to be local and rename for consistency with other drivers. - Revert a false handling of 0 as an error introduced earlier this cycle. * bmi160 - Use devm functions throughout probe() to avoid need for remove(). * hid-sensor-hub - White space cleanup. * hts221 - MAINTAINERS entry. * lis302 - Use generic name in the DT binding doc. * Messon-saradc - Check for allocation error. - Fix some presented clock names that break clk debugfs. * qcom-spmi-adc - A fix for initialization of the prescale property. Came late in the cycle, so merge window is probably the best route for this. * st_lsm6dsx - Allow for variable read length to support wider range of slave devices. * tag 'iio-for-4.21b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (37 commits) iio: adc: qcom-spmi-adc5: Initialize prescale properly dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant iio: adc: Allow selection of Exynos ADC on S5PV210 iio: adc: exynos-adc: Add S5PV210 variant iio: bmi160: use all devm functions in probe iio: dac: ad5686: fix bit shift read register iio:dac:ad5686: Add AD5310R support Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0" dt-bindings: iio: accel: use a generic node name for lis302 iio: core: check 'info' value before registering the device staging: iio: adc: ad7280a: fix overwrite of the returned value staging: iio: adc: ad7280a: check for devm_kasprint() failure iio: humidity: hts221: add entry in MAINTAINERS file iio: magnetometer: ak8975: Add the "AKM9911" ACPI HID staging:iio:ad2s90: Move out of staging staging:iio:ad2s90: Add comment to device state mutex staging:iio:ad2s90: Replace license text w/ SPDX identifier dt-bindings:iio:resolver: Add docs for ad2s90 staging:iio:ad2s90: Add max frequency check at probe staging:iio:ad2s90: Remove spi setup that should be done via dt ...
2018-12-12iio: adc: qcom-spmi-adc5: Initialize prescale properlyEvan Green
adc5_get_dt_data uses a local, prop, feeds it to adc5_get_dt_channel_data, and then puts the result into adc->chan_props. The problem is adc5_get_dt_channel_data may not initialize that structure fully, so a garbage value is used for prescale if the optional "qcom,pre-scaling" is not defined in DT. adc5_read_raw then uses this as an array index, generating a crash that looks like this: [ 6.683186] Unable to handle kernel paging request at virtual address ffffff90e78c7964 Call trace: qcom_vadc_scale_code_voltage_factor+0x74/0x104 qcom_vadc_scale_hw_calib_die_temp+0x20/0x60 qcom_adc5_hw_scale+0x78/0xa4 adc5_read_raw+0x3d0/0x65c iio_channel_read+0x240/0x30c iio_read_channel_processed+0x10c/0x150 qpnp_tm_get_temp+0xc0/0x40c of_thermal_get_temp+0x7c/0x98 thermal_zone_get_temp+0xac/0xd8 thermal_zone_device_update+0xc0/0x38c qpnp_tm_probe+0x624/0x81c platform_drv_probe+0xe4/0x11c really_probe+0x188/0x3fc driver_probe_device+0xb8/0x188 __device_attach_driver+0x114/0x180 bus_for_each_drv+0xd8/0x118 __device_attach+0x180/0x27c device_initial_probe+0x20/0x2c bus_probe_device+0x78/0x124 deferred_probe_work_func+0xfc/0x138 process_one_work+0x3d8/0x8b0 process_scheduled_works+0x48/0x6c worker_thread+0x488/0x7cc kthread+0x24c/0x264 ret_from_fork+0x10/0x18 Unfortunately, when I went to add the initializer for this and tried to boot it, my machine shut down immediately, complaining that it was hotter than the sun. It appears that adc5_chans_pmic and adc5_chans_rev2 were initializing prescale_index as if it were directly a divisor, rather than the index into adc5_prescale_ratios that it is. Fix the uninitialized value, and change the static initialization to use indices into adc5_prescale_ratios. Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-12iio: adc: Allow selection of Exynos ADC on S5PV210Jonathan Bakker
Make it possible to use Exynos ADC driver on S5PV210 based devices. Signed-off-by: Jonathan Bakker <xc-racer2@live.ca> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-12iio: adc: exynos-adc: Add S5PV210 variantJonathan Bakker
S5PV210's ADC variant is almost the same as v1 except that it has 10 channels and doesn't require the pmu register Signed-off-by: Jonathan Bakker <xc-racer2@live.ca> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-12staging: mt7621-mmc: Fix incompletely removed #if 0 block in sd.cNishad Kamdar
Commit 2a54e3259e2a ("staging: mt7621-mmc: Remove #if 0 blocks in sd.c") does not completely remove an #if 0 block in sd.c. This causes the function msdc_select_clksrc() which was eariler not compiled, to be compiled. That causes an error - MSDC_CLKSRC_REG is not defined. This patch completely removes the #if 0 block Reported-by: NeilBrown <neil@brown.name> Fixes: 2a54e3259e2a ("staging: mt7621-mmc: Remove #if 0 blocks in sd.c") Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: bcm2835-camera: Add hint about possible faulty configStefan Wahren
As per default the GPU memory config of the Raspberry Pi isn't sufficient for the camera usage. Even worse the bcm2835 camera driver doesn't provide a helpful error message in this case. So let's add a hint to point the user to the likely cause. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: bcm2835-camera: Provide more specific probe error messagesStefan Wahren
Currently there is only a catch-all info message which print the relevant error code without any context. So add more specific error messages in order to narrow down possible issues. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: bcm2835-audio: Drop DT dependencyStefan Wahren
Just like the bcm2835-video make this a platform driver which is probed by vchiq. In order to change the number of channels use a module parameter instead, but use the maximum as default. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: bcm2835-audio: use module_platform_driver() macroStefan Wahren
There is not much value behind this boilerplate, so use module_platform_driver() instead. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: bcm2835-audio: Enable compile testStefan Wahren
Enable the compilation test for bcm2835-audio to gain more build coverage. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: vchiq_arm: Register a platform device for audioStefan Wahren
Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") this register the audio driver as a platform device, too. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: vchiq_arm: Fix camera device registrationStefan Wahren
Since the camera driver isn't probed via DT, we need to properly setup DMA. Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: bcm2835-camera: Move module info to the endStefan Wahren
In order to have this more consistent between the vc04 services move the module information to the end of the file. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: bcm2835-camera: fix module autoloadingStefan Wahren
In order to make the module bcm2835-camera load automatically, we need to add a module alias. Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.") Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: bcm2835-camera: Abort probe if there is no cameraStefan Wahren
Abort the probing of the camera driver in case there isn't a camera actually connected to the Raspberry Pi. This solution also avoids a NULL ptr dereference of mmal instance on driver unload. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-dts: avoid warnings in pinctrl definitionsNeilBrown
The device-tree checking code sees node names "i2c" and "spi" in the pinctrl definition and thinks these are defining i2c or spi devices, and complains that they look wrong. So add a '0' to the end of each name (much like "uart" and "rgmii" have numbers at the end) to avoid the warning. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-mmc: fix compile warnging: cmd_bufNeilBrown
cmd_buf is only used when MT6575_SD_DEBUG is defined. So only declare it in that case. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-mmc: add missing header.NeilBrown
<linux/interrupt.h> is sometimes included by other include files, and sometimes not, depending on config, particularly CONFIG_HIGHMEM. So include it explicitly rather than relying on implicit inclusion. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-eth: fix compile warning.NeilBrown
This code generates a waring as PHY_GBIT_FEATURES is "long" but ->supported in "int". It looks likely that "PHY_1000BT_FEATURES" is the correct define to use - it is intended to be used with the ->features field. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-dts: allow gnubee to reboot cleanly.NeilBrown
Since commit bb276262e88d ("mtd: spi-nor: only apply reset hacks to broken hardware"), we need to mark the spi-nor as "broken" for reboot to work. Note that nothing is actually broken here. The hardware-watchdog in the SoC isn't wired in a way that works, but then the board doesn't claim to support a hardware watchdog - and the SPI certain isn't "broken". This causes an annoying warning on every boot, but that is better than failing on ever reboot. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-mmc: set correct dma mask.NeilBrown
Since commit f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for simple noncoherent platforms") changed MIPS dma handling, the mmc driver fails because it doesn't have a dma mask is set. So set the correct dma mask. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-eth: set correct dma mask.NeilBrown
Since commit f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for simple noncoherent platforms") changed MIPS dma handling, the eth driver fails because the dma mask is set on the wrong 'struct device'. Move the setting to the correct struct device. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: vchiq: rework remove_event handlingArnd Bergmann
I had started the removal of semaphores in this driver without knowing that Nicolas Saenz Julienne also worked on this. In case of the "remote event" infrastructure, my solution seemed significantly better, so I'm proposing this as a change on top. The problem with using either semaphores or completions here is that it's an overly complex way of waking up a thread, and it looks like the 'count' of the semaphore can easily get out of sync, even though I found it hard to come up with a specific example. Changing it to a 'wait_queue_head_t' instead of a completion simplifies this by letting us wait directly on the 'event->fired' variable that is set by the videocore. Another simplification is passing the wait queue directly into the helper functions instead of going through the fragile logic of recording the offset inside of a structure as part of a shared memory variable. This also avoids one uncached memory read and should be faster. Note that I'm changing it back to 'killable' after the previous patch changed 'killable' to 'interruptible', apparently based on a misunderstanding of the subtle down_interruptible() macro override in vchiq_killable.h. Fixes: f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: rtl8723bs: remove semaphore remnantsArnd Bergmann
Nothing uses the semaphores any more in this driver, so remove all references to that type. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: rtl8723bs: change pwrctrl lock to a mutexArnd Bergmann
This semaphore is used like a mutex, so it should use the regular mutex API, as we do in the other copies of this driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: rtl8723bs: change semaphores to completionsArnd Bergmann
This driver uses many semaphores, most of them are equivalent to completions. The other copies of this driver got moved over to completions a while ago, so do the same here. In this usage scenario, the two are equivalent, so the behavior should not change. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: rtl8723bs: fix typo in the TODO fileMichael Straube
HGz -> GHz Signed-off-by: Michael Straube <straube.linux@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: rtl8723bs: remove dead code, rtw_port_switch_chk()Michael Straube
The function rtw_port_switch_chk() returns always false. Remove the function and related dead code. Signed-off-by: Michael Straube <straube.linux@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: rtl8188eu: reuse Hal_GetChnlGroup88E()Michael Straube
Use Hal_GetChnlGroup88E() instead of duplicating it's code in get_rx_power_val_by_reg(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: rtl8188eu: simplify loop in rtl88eu_phy_iq_calibrate()Michael Straube
Zeroing the array result[m][n] and setting only the values at even 'n's simplifies the code and slightly reduces object file size. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: comedi: change do_insn*_ioctl to allow more samplesSpencer E. Olson
Changes do_insn*_ioctl functions to allow for data lengths for each comedi_insn of up to 2^16. This patch also changes these functions to only allocate as much memory as is necessary for each comedi_insn, rather than allocating a fixed-sized scratch space. In testing some user-space code for the new INSN_DEVICE_CONFIG_GET_ROUTES facility with some newer hardware, I discovered that do_insn_ioctl and do_insnlist_ioctl limited the amount of data that can be passed into the kernel for insn's to a length of 256. For some newer hardware, the number of routes can be greater than 1000. Working around the old limits (256) would complicate the user-space/kernel interaction. The new upper limit is reasonable with current memory available and does not otherwise impact the memory footprint for any current or otherwise typical configuration. Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-spi: drop support for SPI mode 1/2/3Chuanhong Guo
As explained in previous patch, this SPI controller seems to be tested on SPI flash only before mass production and some bits are swizzled under other SPI modes probably due to incorrect wiring inside the silicon. Drop implementation of SPI mode 1/2/3 since they are broken. Also drop RT2880_SPI_MODE_BITS macro because we now have only SPI_LSB_FIRST implemented and the mode_bits is so short that we don't need a macro there. Signed-off-by: Chuanhong Guo <gch981213@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-spi: drop the broken full-duplex modeChuanhong Guo
According to John Crispin (aka blogic) on IRC on Nov 26 2018: so basically i made cs1 work for MTK/labs when i built the linkit smart for them. the req-sheet said that cs1 should be proper duplex spi. however .... 1) the core will always send 1 byte before any transfer, this is the m25p80 command. 2) mode 3 is broken and bit reversed (?) 3) some bit are incorrectly wired in hw for mode2/3 we wrote a test script and test for [0-0xffff] on all modes and certain bits are swizzled under certain conditions and it was not possible to fix this even using a hack. we then decided to use spi-gpio and i never removed the errornous code basically the spi is fecked for anything but half duplex spi mode0 running a sflash on it The controller will always send some data from OPCODE register under half duplex mode before starting a full-duplex transfer, so the full-duplex mode is broken. This piece of code also make CS1 unavailable since it forces the broken full-duplex mode to be used on CS1. Signed-off-by: Chuanhong Guo <gch981213@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>