summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
...
| * iio: pressure: st_pressure: fix drdy configuration for LPS22HB and LPS25HLorenzo Bianconi2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | Remove int2 configuration parameter for LPS22HB and LPS25H since these devices export just int1 as data-ready line Fixes: 931878405b86 (iio:pressure: Add support for LPS25H pressure sensor) Fixes: e039e2f5b4da (iio:st_pressure:initial lps22hb sensor support) Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
| * iio: adc: xadc: Fix coding style violationsSai Krishna Potthuri2017-08-122-25/+23
| | | | | | | | | | | | | | | | | | | | | | This patch fix following checkpatch warnings in xadc driver 1. prefer 'unsigned int' to bare use of 'unsigned'. 2. else is not generally useful after a break or return. 3. fill all function definition arguments with identifier name Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
| * staging: iio: adc: fix error return code in ad7606_par_probe()Gustavo A. R. Silva2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | platform_get_irq() returns an error code, but the ad7606_par driver ignores it and always returns -ENODEV. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Print and propagate the return value of platform_get_irq on failure. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
| * iio: trigger: stm32-timer: add output compare triggersFabrice Gasnier2017-08-121-11/+20
| | | | | | | | | | | | | | Add output compare trigger sources available on some instances. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
| * iio: trigger: stm32-timer: add support for STM32H7Fabrice Gasnier2017-08-121-4/+51
| | | | | | | | | | | | | | | | | | | | Add support for STM32H7 timer triggers: - Add new valids_table - Introduce compatible, with configuration data - Extend up to 15 timers, available on STM32H7 Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
| * iio: adc: ti-ads7950: Add OF device ID tableAndy Shevchenko2017-08-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a SPI device registered via OF will always match a legacy SPI device ID and that the MODALIAS reported will always be of the form spi:<device>. There is an ACPI method to enumerate such devices via specific ACPI ID and use of compatible strings. It will not work for the drivers which have no OF match ID table present. Besides this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Tested-by: David Lechner <david@lechnology.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
| * iio: adc: stm32: add optional st,min-sample-time-nsecsFabrice Gasnier2017-08-091-4/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | STM32 ADC allows each channel to be sampled with a different sampling time, by setting SMPR registers. Basically, value depends on local electrical properties. Selecting correct value for sampling time highly depends on analog source impedance. There is a manual that may help in this process: 'How to get the best ADC accuracy in STM32...' This patch allows to configure minimum sampling time via device tree, either for: - all channels at once: st,min-sample-time-nsecs = <10000>; - independently for each channel (must match "st,adc-channels" list): st,adc-channels = <0 1>; st,min-sample-time-nsecs = <5000 10000>; Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* | staging: lustre: mgc: fix potential use after free in error pathCihangir Akturk2017-08-181-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config_log_add() function first calls config_log_put() with the variable 'cld' and then jumps to label 'out_cld', which will call the same function with the same 'cld' variable. However, at this point, 'cld' might have been already freed by the first invocation of config_log_put(). Even if we remove the invocation at that point, we will still get into trouble. This is because, in the error path, just below the label 'out_cld', we try to put 'params_cls' and 'sptlrpc_cld', which might also have been freed by config_log_put(). The point is that, config_llog_data::cld_sptlrpc and config_llog_data::cld_params members are assigned at the beginning of this function. To avoid this, do not call config_log_put() inside the else block, immediately jump to 'out_cld' instead. Moreover, remove assignments to config_llog_data::cld_sptlrpc and config_llog_data::cld_params at the beginning, since we already assign them below in the function with 'cld_lock' held. As an additional benefit, code size gets smaller. before: text data bss dec hex filename 26188 2256 4208 32652 7f8c drivers/staging/lustre/lustre/mgc/mgc_request.o after: text data bss dec hex filename 26092 2256 4208 32556 7f2c drivers/staging/lustre/lustre/mgc/mgc_request.o Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: obd: make echo_lock_ops constBhumika Goyal2017-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | Declare echo_lock_ops object of type cl_lock_operations as const as it is only passed to the function cl_lock_slice_add. The corresponding argument is of type const, so make the object const. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: declare fiemap_for_stripe staticDavid Wittman2017-08-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | Declare fiemap_for_stripe as static to fix sparse warnings: > warning: symbol 'fiemap_for_stripe' was not declared. Should it be > static? Signed-off-by: David Wittman <dwittman@gmail.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: fix minor typos in commentsNeilBrown2017-08-182-3/+3
| | | | | | | | | | | | | | | | Fix minor typos in comments. Signed-off-by: NeilBrown <neilb@suse.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: typec: tcpm: explicit_contract is always establishedBadhri Jagan Sridharan2017-08-181-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While in SNK_READY state, the explicit_contract seems to be set to true irrespective of whether an explicit contract was established for the current connection. TCPM also seems to report the pwr_opmode as TYPEC_PWR_MODE_PD always once the port gets into SNK_READY state. This isn't completely true as port gets into the SNK_READY state for non-pd type-c ports as well. This patch sets the explicit_contract flag only when the PS_READY message is received and the vbus has been detected by the port controller. Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: greybus: Match alignment with open parenthesis.Shreeya Patel2017-08-181-19/+16
| | | | | | | | | | | | | | | | | | Alignment should match with open parenthesis. This fixes the coding style issue. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Reviewed-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: speakup: fix async usb removalOkash Khawaja2017-08-181-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an external USB synth is unplugged while the module is loaded, we get a null pointer deref. This is because the tty disappears while speakup tries to use to to communicate with the synth. This patch fixes it by checking tty for null before using it. Since tty can become null between the check and its usage, a mutex is introduced. tty usage is now surrounded by the mutex, as is the code in speakup_ldisc_close which sets the tty to null. The mutex also serialises calls to tty from speakup code. In case of tty being null, this sets synth->alive to zero and restarts ttys in case they were stopped by speakup. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: speakup: remove support for lp*Okash Khawaja2017-08-181-22/+1
| | | | | | | | | | | | | | | | | | | | Testing has shown that lp* devices don't work correctly with speakup just yet. That will require some additional work. Until then, this patch removes code related to that. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: most: hdm-dim2: fix error return code in dim2_probe()Gustavo A. R. Silva2017-08-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platform_get_irq() returns an error code, but the dim2_hdm driver ignores it and always returns -ENODEV. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Also, notice that platform_get_irq() no longer returns 0 on error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print and propagate the return value of platform_get_irq on failure. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: wlan-ng: hfa384x.h: Use endian type in 'hfa384x_link_status' structRicardo Silva2017-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The 'linkstatus' field from struct 'hfa384x_link_status' represents a 16-bit little-endian integer, so declare it as such to avoid the following sparse warning when accessing it through the 'le16_to_cpu()' function: prism2sta.c:1450:31: warning: cast to restricted __le16 Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: wlan-ng: Fix sparse warning: cast to restricted __le16.AbdAllah-MEZITI2017-08-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The same structure is used in both side, so we dont need to cast. This will fix the following sparse warnings: drivers/staging/wlan-ng/prism2sta.c:1139:13: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:1150:24: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:1157:37: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:1158:37: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:1159:40: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:1450:31: warning: cast to restricted __le16 Signed-off-by: AbdAllah MEZITI <abdallah.meziti.pro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | drivers/staging/wlan-ng/p80211conv.c: fixed a potential memory leakLynn Lei2017-08-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | Fixed a potential memory leak inside skb_ether_to_p80211() When the wep_encrypt() fails the code return 2 directly Which causes the p80211_wep->data dangling Add a kfree statement to reclaim that memory allocated Signed-off-by: Lynn Lei <lynnl.yet@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: octeon: fix line over 80 charactersJohn Smith2017-08-181-38/+41
| | | | | | | | | | | | | | | | | | | | | | | | ethernet-rx.c: fix WARNING: line over 80 characters The code was restructured a bit, a helper function was added to cvm_oct_poll. Signed-off-by: John Smith <catalinnow@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | rtl8723bs: os_dep: ioctl_linux: fix several braces coding style issues.Teo Dacquet2017-08-181-698/+298
| | | | | | | | | | | | | | | | | | Fix checkpatch issues: ERROR: that open brace { should be on the previous line. WARNING: braces {} are not necessary for single statement blocks. Signed-off-by: Teo Dacquet <teo.dacquet@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/rtl8723bs: Fix some coding style issues in rtw_odm.c.Tom Gardi2017-08-181-17/+21
| | | | | | | | | | | | | | | | | | WARNING: line over 80 characters WARNING: static const char * array should probably be static const char * const CHECK: Unnecessary parentheses around hal_data->odmpriv Signed-off-by: Tom Gardi <gardi@gmx.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: rtl8723bs: fix multiple missing spaces coding style problemChristoffer Kjoelbaek2017-08-181-5/+5
| | | | | | | | | | | | | | | | | | According to the coding-style documentation, spaces are required around most binary and ternary operators. Spaces were added to fix mulitple coding-style errors. Signed-off-by: Christoffer Kjoelbaek <christoffer@kjoelbaek.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: bcm2835-camera: constify vb2_ops structuresJulia Lawall2017-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These vb2_ops structures are only stored in the ops field of a vb2_queue structure, which is declared as const. Thus the vb2_ops structures themselves can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p = { ... }; @ok@ identifier r.i; struct vb2_queue e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct vb2_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct vb2_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: most: hdm-dim2: constify platform_device_idArvind Yadav2017-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | platform_device_id are not supposed to change at runtime. All functions working with platform_device_id provided by <linux/platform_device.h> work with const platform_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: bcm2835-audio: make snd_pcm_hardware constBhumika Goyal2017-08-181-2/+2
| | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: constify usb_device_idArvind Yadav2017-08-181-1/+1
| | | | | | | | | | | | | | | | | | usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8712: constify usb_device_idArvind Yadav2017-08-181-1/+1
| | | | | | | | | | | | | | | | | | usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: most: usb: constify usb_device_idArvind Yadav2017-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Revert "staging: imx: fix non-static declarations"Greg Kroah-Hartman2017-08-181-12/+12
| | | | | | | | | | | | | | | | | | | | This reverts commit 9a5a6911aa3fb679f4640d5cf2346d095a7641f1 as it causes unneeded build warnings :( Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: JB Van Puyvelde <jbvanpuyvelde@gmail.com> Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: typec: tcpm: Report right typec_pwr_opmodeBadhri Jagan Sridharan2017-08-181-2/+19
| | | | | | | | | | | | | | | | | | | | | | At present, TCPM does not take into account the actual resistor value presented in the CC line and therefore reports TYPEC_PWR_MODE_USB irrespective of the power_op_mode it is in. This patch makes TCPM consider the actual value of Rp. Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: typec: tcpm: Check cc status before entering SRC_TRY_DEBOUCEBadhri Jagan Sridharan2017-08-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ 130.893355] state change SNK_DEBOUNCED -> SRC_TRY [ 130.893363] cc:=3 [ 130.893490] pending state change SRC_TRY -> SNK_TRYWAIT @ 100 ms [ 130.895602] CC1: 3 -> 0, CC2: 0 -> 0 [state SRC_TRY, polarity 0, disconnected] [ 130.895613] state change SRC_TRY -> SRC_TRY_DEBOUNCE [ 130.895621] pending state change SRC_TRY_DEBOUNCE -> SRC_ATTACHED @ 20 ms [ 130.916843] state change SRC_TRY_DEBOUNCE -> SRC_ATTACHED [delayed 20 ms] Although the CC state was changing to TYPEC_CC_OPEN, the port entered SRC_TRY_DEBOUNCE from SRC_TRY. The port must enter SRC_TRY_DEBOUNCE only if the CC state is TYPEC_CC_RD. Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com> [groeck: Wording] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: typec: tcpm: Improve role swap with non PD capable partnersGuenter Roeck2017-08-181-26/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the partner is not PD capable, we can not use a power role set request to swap roles. Use the data role set request instead. Also, if a partner is not PD capable, it does not really make sense to send a PD message to trigger a role swap. On top of that, we should really wait for the attempted role change to complete. Otherwise, it may well be that user space requests another role change immediately afterwards which will fail because the port is not yet in ready state. Trigger the role swap from data role change requests and introduce new state PORT_RESET and use it to solve the problem. This new state is mostly identical to ERROR_RECOVERY, only it does not cause a pending role change to fail. Use this new state also when initializing the driver. Rename ERROR_RECOVERY_WAIT_OFF to PORT_RESET_WAIT_OFF to better reflect its new meaning. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: typec: tcpm: Add timeout when waiting for role swap completionGuenter Roeck2017-08-182-7/+17
| | | | | | | | | | | | | | | | | | | | The Type-C protocol manager state machine could fail, which might result in role swap requests from user space to hang forever. Add a generous timeout when waiting for role swaps to complete to avoid this situation. Originally-from: Badhri Jagan Sridharan <badhri@google.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: typec: tcpm: Select default state based on port typeBadhri Jagan Sridharan2017-08-181-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tcpm_default_state wasn't considering the port type when determining the default role. This change makes tcpm_default_state to consider port type as well. tcpm_default_state would return the following based on the port type: TYPEC_PORT_UFP - SNK_UNATTACHED TYPEC_PORT_DFP - SRC_UNATTACHED TYPEC_PORT_DRP - based on the preferred_role setting Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com> [groeck: Reworded description; minor formatting changes] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: typec: tcpm: Set default state after error recovery based on port typeBadhri Jagan Sridharan2017-08-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While exiting ERROR_RECOVERY, choose default state based on the port type instead of current power role. Quoting from specification: 4.5.2.2.2 ErrorRecovery State This state appears in Figure 4-12, Figure 4-13, Figure 4-14, Figure 4-15, Figure 4-16 and Figure 4-17. The ErrorRecovery state is where the port removes the terminations from the CC1 and CC2 pins for tErrorRecovery followed by transitioning to the appropriate Unattached.SNK or Unattached.SRC state based on port type. This is the equivalent of forcing a detach event and looking for a new attach. Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: typec: tcpm: Report role swap complete after entering READY stateGuenter Roeck2017-08-181-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Role swap requests fail unless the current role is either SRC_READY or SNK_READY. This works fine for VCONN and data role swaps, where we immediately enter READY state after reporting a successful role swap to user space. However, on power role changes, the role swap is currently reported as successful while power negotiation is still in process. User space does not know this, and may request another role swap immediately after a power role swap is reported to be complete. This second role swap will fail with -EAGAIN. To fix the problem, report role swap completion after power negotiation is complete and the state machine enters SRC_READY or SNK_READY state. This is better anyway since it captures errors due to failed power negotiations. It also simplifies the code since the number of calls needed to report successful role swaps is reduced. Reported-by: Howard Yen <howard_yen@htc.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: typec: tcpm: Constify alternate modesGuenter Roeck2017-08-182-2/+2
| | | | | | | | | | | | | | | | Constify alternate mode configuration data which won't be touched by the driver. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: replace INVALID_PARAM macro with inline codeMarcin Ciupak2017-08-181-45/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following macro: \#define INVALID_PARAM { \ dev_dbg(&spi->dev, "set: illegal input param"); \ return -EINVAL; \ } affects control flow by having return statement. This is against Linux Kernel Coding Style and should be avoided and therefore this macro is replaced by inline code. Additionally following 3 minor issues: ERROR: code indent should use tabs where possible ERROR: spaces required around that '!=' (ctx:VxV) ERROR: space prohibited before that close parenthesis ')' were fiexed inline. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: replace logical not with bitwiseQuentin Swain2017-08-181-1/+1
| | | | | | | | | | | | | | | | sparse reports the following warning "warning: dubious: x & !y". Replaced te logical not with bitwise to resolve the warning Signed-off-by: Quentin Swain <dudebrobro179@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: vboxvideo: remove dead gamma lut codePeter Rosin2017-08-182-20/+0
| | | | | | | | | | | | | | | | | | | | The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code that was not doing anything sensible anyway. Signed-off-by: Peter Rosin <peda@axentia.se> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: vboxvideo: Call fb_deferred_io_cleanup() on cleanupHans de Goede2017-08-181-0/+5
| | | | | | | | | | | | | | | | | | On driver cleanup we need to call fb_deferred_io_cleanup() if build with CONFIG_FB_DEFERRED_IO set. Suggested-by: Michael Thayer <michael.thayer@oracle.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: vboxvideo: Add dri-devel to lists of email-addresses to send patches toHans de Goede2017-08-181-2/+2
| | | | | | | | | | | | | | | | Patches for the vboxvideo driver should also be Cc-ed to dri-devel, update the TODO file accordingly. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: vboxvideo: switch to drm_*{get,put} helpersCihangir Akturk2017-08-183-6/+6
| | | | | | | | | | | | | | | | | | | | drm_*_reference() and drm_*_unreference() functions are just compatibility alias for drm_*_get() and drm_*_put() adn should not be used by new code. So convert all users of compatibility functions to use the new APIs. Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: vboxvideo: select DRM_TTMCihangir Akturk2017-08-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | vboxvideo code uses various ttm_* functions, so it needs "drivers/gpu/drm/ttm/*" to be built. In order to build these objects select DRM_TTM. This commit fixes "ttm_*" undefined build errors. Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: ccree: constify dev_pm_ops structures.Arvind Yadav2017-08-161-1/+1
| | | | | | | | | | | | | | | | | | dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by <linux/device.h> work with const dev_pm_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: ccree: Use sizeof(variable) in memory allocsSimon Sandström2017-08-166-13/+14
| | | | | | | | | | | | | | | | | | Fixes 9 checkpatch.pl warnings of type "Prefer kmalloc(sizeof(variable)...) over kmalloc(sizeof(type)...)" in staging/ccree. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: rf69.c style fix - spaces open braceMarcin Ciupak2017-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch fixes the following checkpatch.pl error: ERROR: space required before the open brace '{' in rf69.c file as requested by TODO file. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: rf69.c style fix - else close braceMarcin Ciupak2017-08-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | This patch fixes the following checkpatch.pl error: ERROR: else should follow close brace '}' in rf69.c file as requested by TODO file. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: pi433: rf69.c style fix - that open braceMarcin Ciupak2017-08-141-22/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following checkpatch.pl error: ERROR: that open brace { should be on the previous line in rf69.c file as requested by TODO file. Note: ERROR: else should follow close brace '}' remains valid here and is going to be fixed by the next patch in set. Additionally some style warnings remain valid here and could be fixed by another patch. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>