- 19 4月, 2017 2 次提交
-
-
由 Laura Abbott 提交于
Frameworks that may want to enumerate CMA heaps (e.g. Ion) will find it useful to have an explicit name attached to each region. Store the name in each CMA structure. Signed-off-by: NLaura Abbott <labbott@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Greg Kroah-Hartman 提交于
Merge tag 'iio-fixes-for-4.11e' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Fifth set of IIO fixes for the 4.11 cycle. As these are rather late in the cycle, they may sneak over into 4.12. There is a fix for a regression caused by another fix (hid sensors hardware seems to vary a lot in how various corner cases are handled). * ad7303 - fix channel description. Numeric values were being passed as characters presumably leading to garbage from the userspace interface. * as3935 - the write data macro was wrong so fix it. * bmp280 - incorrect handling of negative values as being unsigned broke humidity calculation. * hid-sensor - Restore the poll and hysteresis values after resume as some hardware doesn't do it. * stm32-trigger - buglet in reading the sampling frequency
-
- 18 4月, 2017 30 次提交
-
-
由 Greg Kroah-Hartman 提交于
Merge tag 'iio-for-4.12d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Fourth set of IIO new device support, features and cleanups for the 4.12 cycle New device support * max1117, 1118 and 1119 - new ADC driver * max9611 - new ADC driver * pm8xxx hk/xoadc - new driver with some shared features broken out from the SPMI vadc. * sun4i-gpadc - A33 thermal sensor support (with associated rework) * stm32-dac - new driver and bindings * stm32 trigger - enable support of quadrature encoder device and counter modes Features * apds9960 - use the runtime pm for normal suspend * stm32-adc - add opition to sest resolution via devicetree * xoadc - augment DT bindings to deal with some weird mux cases Cleanups * ad5933 - protect direct mode using claim and release helpers * ade7759 - S_IRUGO and friends to octal in two goes * adis16203 - drop unnecessary brackets * hid-sensor - fix unbalanced pm_runtieme_enable error when probing after remove * lsm6dsx - use actual part numbers for device name when known - simplify data read pin parsing * mpu3050 - avoid double reporting errors
-
由 Martin Karamihov 提交于
This patch fixes the following sparse warning: ieee80211_tx.c:174:36: incorrect type in assignment (different base types) ieee80211_tx.c:174:36: expected unsigned short [unsigned] [short] [usertype] <noident> ieee80211_tx.c:174:36: got restricted __be16 [usertype] <noident> by adding left side cast to __be16. Signed-off-by: NMartin Karamihov <martinowar@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Aishwarya Pant 提交于
Changed the type of wpa_ie_len from (int *) to (unsigned int *) in the function rtw_get_wpa_ie(..) to suppress signedness mismatch warnings in rtw_generate_ie of the type- drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: expected int *wpa_ie_len drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: got unsigned int *<noident> Signed-off-by: NAishwarya Pant <aishpant@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Aishwarya Pant 提交于
Changed the type of sz from (int) to (unsigned int) to suppress signedness mismatch warnings of the type- drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97: warning: incorrect type in argument 5 (different signedness) drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97: expected unsigned int [usertype] *frlen drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97: got int *<noident> Signed-off-by: NAishwarya Pant <aishpant@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Aishwarya Pant 提交于
Changed the type of len from (int *) to (unsigned int *) in the function rtw_get_ie(..) and wherever this function is called to suppress signedness mismatch warnings of the type- drivers/staging/rtl8188eu//core/rtw_ap.c:78:60: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8188eu//core/rtw_ap.c:78:60: expected int *len drivers/staging/rtl8188eu//core/rtw_ap.c:78:60: got unsigned int *<noident> Signed-off-by: NAishwarya Pant <aishpant@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Colin Ian King 提交于
The two different paths for an if statement are identical and hence we can just replace it with the single statement. Detected by CoverityScan, CID#1428443 ("Identical code for different branches") Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Colin Ian King 提交于
The comparison of mode >= 0 is redundant as mode is a u32 and this is always true. Remove this redundant code. Detected with CoverityScan ("Unsigned compared against 0") Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin Wern 提交于
Gstreamer's v4l2src reacted poorly to certain outputs from the bcm2835 video driver's ioctl ops function vidioc_enum_framesizes, so a workaround was created that could be activated by user input. This workaround would replace the driver's ioctl ops struct with another, similar struct--only with no function pointed to by vidioc_enum_framesizes. With no response, gstreamer would attempt to continue with some default settings that happened to work better. However, this bug has been fixed in gstreamer since 2014, so we shouldn't include this workaround in the stable version of the driver. Signed-off-by: NKevin Wern <kevin.m.wern@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
Checkpatch emits WARNING: quoted string split across lines. Concatenate string onto single line. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
Driver SDIO code uses helper functions to do IO to the SDIO device. Current helpers handle IO of a single byte as well as multi-byte. Driver predominately uses single byte IO. If the common case is made simple it simplifies the whole driver. The common case can be made simple by splitting the multi-byte and single byte calls into separate functions, i.e 4 functions in total, read single byte, read multi-byte, write single byte, write multi-byte. Also, we need to handle the debug code. Currently debug calls after read/write fail access the IO buffer. This buffer, at best, does not hold useful data on the error path, at worst is uninitialized and holds garbage. Split read/write helper functions into two functions each, one for single byte IO and one for multi-byte IO. Fix all call sites. Do not change the program logic. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
Checkpatch emits CHECK: Please don't use multiple blank lines. Remove multiple blank lines. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
Checkpatch emits WARNING: please, no space before tabs. Remove space before tabs. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
goto label includes 'err_' suffix but is executed on non-error paths. Remove err_ suffix from goto label. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
SDIO code currently has a number of unneeded comments. Following kernel coding style we do not need extraneous comments, especially on code where it is clear what is being done. Spelling typos can be fixed. Remove unnecessary comments, fix typos in comments. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
ks_sdio_card structure description does not have a kernel doc format comment. Add kernel doc format comment to struct ks_sdio_card. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
Currently driver uses a hardware information struct description to group some SDIO related functionality (work, work queue, sdio private data pointer). This structure is then embedded in the device private data structure. Having nested structures described in different header files means that to view the device private data programmers must open two header files. This structure could be embedded anonymously in the device private data and achieve the same result (grouping of function specific to SDIO) without the need to open multiple headers. However, the SDIO private data structure already has various different data and pointers, adding the embedded structure adds little extra meaning and lengthens all the dereferences throughout the driver, often meaning addition line breaks and braces. We can increase readability and reduce code complexity by moving the hardware information data and pointers to directly be within the device private data structure description. While preparing for this refactoring it was noted that the identifier currently used for the delayed work is 'rw_wq', this is confusing since the 'wq' suffix typically means 'work queue'. This identifier would be more meaningful if it used the suffix 'dwork' as does the declaration of queue_delayed_work() (include/linux/workqueue.h). The identifier for the work queue is currently 'ks7010sdio_wq'. This identifier can be shortened without loss of meaning because there is only one work queue within the driver. Identifier 'wq' is typical within in-tree driver code and aptly describes the pointer. Current pointer to the SDIO private data is identified by 'sdio_card', this is sufficiently meaningful from within the hw_info structure but once the hw_info_t structure is removed the pointer would be better to have a prefix appended to it to retain the prior level of meaning. Move members from struct hw_info_t to struct ks_wlan_private. Rename identifiers; struct delayed_work pointer 'rw_wq' to 'rw_dwork'. struct workqueue_struct pointer 'ks7010sdio_wq' to 'wq'. struct ks_sdio_card pointer 'sdio_card' to 'ks_sdio_card'. Remove structure description hw_info_t. Fix init/destroy calls. Fix all call sites, SDIO private data access calls, and queuing calls. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
Currently a pointer to the tasklet_struct used for bottom half processing on the receive path is within the hw_info_t structure. This structure is then embedded in the device private data structure. Having the tasklet_struct nested does not add meaning to the device private data, device private data already (and typically) has various data relating to the device, there is no real need to separate the tasklet_struct to a SDIO specific structure. While not adding allot of extra meaning having the nested structure means the programmer must open two header files to read the description of the device private data, the code would be easier to read if the device private data struct description was not spread over two files. Move tasklet_struct out of sdio header file and into the device private data structure description. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
struct work_struct uses identifier ks_wlan_wakeup_task, this is confusing because the 'task' suffix implies that this is a tasklet_struct instead of a work struct. Suffix 'work' would be more clear. The code would be easier to read if it followed the principle of least surprise and used the 'work' suffix for a work_struct identifier. Rename work_struct structure 'ks_wlan_wakeup_task' to 'wakeup_work'. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
SDIO header file does not use kernel doc format struct comments. Adding them aids readability and enables documentation to be built from the source code. Other comments may be tidied up as we do this. Add kernel format struct comments. Tidy up comments. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
complete_handler() takes void * types as parameters. void * parameters are then cast to struct types. Call sites for this function either pass in NULL or pointers to the struct types cast to void *. This casting is unnecessary and can be removed. Struct tx_device_buffer (which contains a pointer member to the complete_handler() function) has as member 'ks_wlan_priv *priv' this is unnecessary, we always have a pointer to this struct there is no need to store it here. The complete_handler can be more clearly defined by using struct pointer types instead of void * types. The code is currently unnecessarily complex, storing and passing extraneous pointer parameters. Remove unnecessary parameters, unnecessary casting to/from 'void *'. Fix all call sites involving complete_handler(). Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
Header has multiple constants defined using preprocessor directive. In the cases where these are an integer progression an enumeration type can be used. Doing so adds documentation to the code and makes the usage explicit. Maintain original constant value, this value is returned by the device. Replace (integer progression) preprocessor constants with enumeration type. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tobin C. Harding 提交于
SDIO header currently defines unused constants READ_STATUS_BUSY and WRITE_STATUS_IDLE. There are reciprocal constants that are used READ_STATUS_IDLE and WRITE_STATUS_BUSY. We can roll these into a single enumeration type and remove the two that are unused. Add enumeration type containing IDLE/BUSY pair that are currently used within the SDIO source. Change source to use new enum types. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Darryl T. Agostinelli 提交于
$ make includecheck | grep staging ./drivers/staging/greybus/uart.c: linux/serial.h is included more than once. Signed-off-by: NDarryl T. Agostinelli <dagostinelli@gmail.com> Reviewed-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Darryl T. Agostinelli 提交于
Fixes: $ make versioncheck | grep staging ./drivers/staging/greybus/light.c: 15 linux/version.h not needed. Signed-off-by: NDarryl T. Agostinelli <dagostinelli@gmail.com> Reviewed-by: NRui Miguel Silva <rmfrfs@gmail.com> Reviewed-by: NAlex Elder <elder@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Skanda Guruanand 提交于
The struct lu_dirpage elements in lustre_idl.h file are modified to __le64 and __le32 types since the elements are always converted from litte endian to processor native format in mdc_request.c file. Following warnings are removed by this fix. drivers/staging/lustre/lustre/mdc/mdc_request.c:958:42: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:959:42: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:962:42: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:963:42: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:985:50: warning: cast to restricted __le32 drivers/staging/lustre/lustre/mdc/mdc_request.c:1193:24: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:1328:25: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:1329:23: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:1332:25: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:1333:23: warning: cast to restricted __le64 Signed-off-by: NSkanda Guruanand <skanda.kashyap@gmail.com> Reviewed-by: NAndreas Dilger <andreas.dilger@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Craig Inches 提交于
This resolves a checkpatch warning that "Single statement macros should not use a do {} while (0) loop" by removing the loop and adjusting line length accordingly. Signed-off-by: NCraig Inches <Craig@craiginches.com> Reviewed-by: NAndreas Dilger <andreas.dilger@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alexandre Bailon 提交于
The cport_quiesce() method is mandatory in the case of the es2 Greybus hd controller to shutdown the cports on the es2 controller. In order to add support of another controller which may not need to shutdown its cports, make the cport_quiesce() optional, and check if the controller implement it before to use it. Signed-off-by: NAlexandre Bailon <abailon@baylibre.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Paul Gortmaker 提交于
The Makefile / Kconfig currently controlling compilation of this code is: clock/Makefile:obj-$(CONFIG_INTEL_ATOMISP) += vlv2_plat_clock.o atomisp/Kconfig:menuconfig INTEL_ATOMISP atomisp/Kconfig: bool "Enable support to Intel MIPI camera drivers" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init was already not in use by this driver, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Alan Cox <alan@linux.intel.com> Cc: linux-media@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Greg Kroah-Hartman 提交于
This removes a strange 'list' file in drivers/staging/media/atomisp/pci/atomisp2/ that was not being used for anything. Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Greg Kroah-Hartman 提交于
Previous patches deleted files, but the Makefile still referenced their .o files. Fix this up by removing them in the Makefile. Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 14 4月, 2017 8 次提交
-
-
由 Andreas Klinger 提交于
While calculating the compensation of the humidity there are negative values interpreted as unsigned because of unsigned variables used. These values as well as the constants need to be casted to signed as indicated by the documentation of the sensor. Signed-off-by: NAndreas Klinger <ak@it-klinger.de> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NMatt Ranostay <matt.ranostay@konsulko.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Matt Ranostay 提交于
APDS9960 can safely force runtime suspend if the system wants to enter system-wide suspend Signed-off-by: NMatt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fabrice Gasnier 提交于
Add support for STMicroelectronics STM32 DAC. It's a 12-bit, voltage output digital-to-analog converter. It has two output channels, each with its own converter. It supports 8 bits or 12bits left/right aligned data format. Only 12bits right-aligned is used here. It has built-in noise or triangle waveform generator, and supports external triggers for conversions. Each channel can be used independently, with separate trigger, then separate IIO devices are used to handle this. Core driver is intended to share common resources such as clock, reset, reference voltage and registers. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fabrice Gasnier 提交于
Document STMicroelectronics STM32 DAC (digital-to-analog converter). Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 René Hickersberger?= 提交于
Fixed a brace coding style issue. Signed-off-by: NRené Hickersberger <renehickersberger@gmx.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
Simplify st_lsm6dsx_of_get_drdy_pin routine since of_property_read_u32 error conditions are already managed in st_lsm6dsx_get_drdy_reg() Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Chen Guanqiao 提交于
This fixes the coding style issue of using (S_IWUSR | S_IRUGO) in place of 4-digit octal numbers. Signed-off-by: NChen Guanqiao <chen.chenchacha@foxmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Narcisa Ana Maria Vasile 提交于
This device operates in DIRECT_MODE and BUFFER_HARDWARE mode. Replace usages of iio_dev->mlock with iio_device_{claim|release}_direct_mode() helper functions to guarantee DIRECT mode and consequently protect BUFFER mode too. Add and use a device private lock to protect against conflicting access of the state data. This helps with IIO subsystem redefining iio_dev->mlock to be used by the IIO core only for protecting device operating mode changes. ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. Protect changing of attributes inside ad5933_store(). Attributes can no longer be changed while in buffered mode. Remove lock from ad5933_work() because buffer mode should be enabled when we reach this, and claiming DIRECT mode in all the other places should protect it. Signed-off-by: NNarcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-