- 26 9月, 2017 1 次提交
-
-
由 Jonathan Cameron 提交于
The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements have gone away. Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 25 9月, 2017 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
Merge tag 'iio-for-4.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Round one of new device support, features and cleanup for IIO in the 4.15 cycle. Note there is a misc driver drop in here given we have support in IIO and the feeling is no one will care. A large part of this series is a boiler plate removal series avoiding the need to explicitly provide THIS_MODULE in various locations. It's very dull but touches all drivers. New device support * ad5446 - add ids to support compatible parts DAC081S101, DAC101S101, DAC121S101. - add the dac7512 id and drop the misc driver as feeling is no one is using it (was introduced for a board that is long obsolete) * mt6577 - add bindings for mt2712 which is fully compatible with other supported parts. * st_pressure - add support for LPS33HW and LPS35HW with bindings (ids mostly). New features * ccs811 - Add support for the data ready trigger. * mma8452 - remove artifical restriction on supporting multiple event types at the same time. * tcs3472 - support out of threshold events Core and tree wide cleanup * Use macro magic to remove the need to provide THIS_MODULE as part of struct iio_info or struct iio_trigger_ops. This is similar to work done in a number of other subsystems (e.g. i2c, spi). All drivers are fixed and then the fields in these structures are removed. This will cause build failures for out of tree drivers and any new drivers that cross with this work going into the kernel. Note mostly done with a coccinelle patch, included in the series on the mailing list but not merged as the fields no longer exist in the structures so the any hold outs will cause a build failure. Cleanups * ads1015 - avoid writing config register when it doesn't change. - add 10% to conversion wait time as it seems it is sometimes a little small. * ade7753 - replace use of core mlock with a local lock. This is part of a long term effort to make the use of mlock opaque and single purpose. * ade7759 - expand the use of buf_lock to cover previous mlock cases. This is a slightly nicer solution to the same issue as in ade7753. * cros_ec - drop an unused variable * inv_mpu6050 - add a missing break in a switch for consistency - not actual bug, - make some local arrays static to save on object code size. * max5481 - drop manual setting of the spi module owner as handled by the spi core. * max5487 - drop manual setting of the spi module owner as handled by the spi core. * max9611 - drop explicit setting of the i2c module owner as handled by the i2c core. * mcp320x - speed up reads on single channel devices, - drop unused of_device_id data elements, - document the struct mcp320x, - improve binding docs to reflect restrictions on spi setup and to make it explicit that the reference regulator is needed. * mma8452 - symbolic to octal permissions, - unsigned to unsigned int. * st_lsm6dsx - avoid setting odr values multiple times, - drop config of LIR as it is only ever set to the existing defaults, - drop rounding configuration as it only ever matches the defaults. * ti-ads8688 - drop manual setting of the spi module owner as handled by the spi core. * tsl2x7x - constify the i2c_device_id, - cleanup limit checks to avoid static checker warnings (and generally have nicer code).
-
- 24 9月, 2017 16 次提交
-
-
由 Lorenzo Bianconi 提交于
Remove rounding configuration since it is enabled by default for the FIFO output registers Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Remove Latched Interrupt configuration since it is enabled by default for FIFO watermark interrupt Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Zhiyong Tao 提交于
This commit adds mt2712 compatible node. Signed-off-by: NZhiyong Tao <zhiyong.tao@mediatek.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Zhiyong Tao 提交于
The commit adds mt2712 compatible node in binding document. Signed-off-by: NZhiyong Tao <zhiyong.tao@mediatek.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lukas Wunner 提交于
All chips supported by this driver clock data out on the falling edge and latch data in on the rising edge, hence SPI mode (0,0) or (1,1) must be used. Furthermore, none of the chips has an internal reference voltage regulator, so an external supply is always required and needs to be specified in the device tree lest the IIO "scale" in sysfs cannot be calculated. Document these requirements in the device tree binding, add compatible strings for the newly supported mcp3550/1/3 and explain that SPI mode (0,0) should be preferred for these chips. Cc: Mathias Duckeck <m.duckeck@kunbus.de> Signed-off-by: NLukas Wunner <lukas@wunner.de> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Update odr value in st_lsm6dsx_sensor data structure just in st_lsm6dsx_write_raw() in order to avoid to set the same value multiple times Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Katie Dunne 提交于
iio_dev->mlock is to be used only by the IIO core for protecting device mode changes between INDIO_DIRECT and INDIO_BUFFER. This patch replaces the use of mlock with the already established buf_lock mutex. Introducing an 'unlocked' spi_write_reg_16 function to be used by ade7759_write_frequency avoids nested locks and maintains atomicity between bus and device frequency changes. Based on the solution found in ade7754 patch here: https://marc.info/?l=linux-iio&m=149086659008991&w=2Signed-off-by: NKatie Dunne <kdunne@mail.ccsf.edu> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Himanshi Jain 提交于
Replace driver usage of mlock with driver private lock to meet the new model where usage of iio_dev->mlock is being redefined as protecting operating mode changes(changes between BUFFER* and DIRECT modes). Signed-off-by: NHimanshi Jain <himshijain.hj@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Harinath Nampally 提交于
Replace 'unsigned' with 'unsigned int' to improve code readability. Issue found by checkpatch. Signed-off-by: NHarinath Nampally <harinath922@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Harinath Nampally 提交于
Replace symbolic permissions with octal permissions to improve code readability. Issue found by checkpatch. Signed-off-by: NHarinath Nampally <harinath922@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Paolo Cretaro 提交于
Fix gcc warning: cros_ec_baro.c:130:25: warning: variable ‘ec_device’ set but not used Signed-off-by: NPaolo Cretaro <paolocretaro@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Dan Carpenter 提交于
The background of this code is that we can either use the default tables or load our own table with sysfs. The default tables are three element arrays of struct tsl2x7x_lux. If we load the table with sysfs then we can have as many as nine elements. Which ever way we do it, the last element is always zeroed out. The most interesting part of this patch is in the in_illuminance0_lux_table_show() function. We were using the wrong limit, "TSL2X7X_MAX_LUX_TABLE_SIZE * 3", when it should have been just "TSL2X7X_MAX_LUX_TABLE_SIZE". This creates a static checker warning that we are going of bounds. However, since the last element is always zeroed out, that means we hit the break statement and the code works correctly despite the wrong limit check. I made several related readability changes. The most notable that I changed the MAX_DEFAULT_TABLE_BYTES define which was: I renamed the define to TSL2X7X_DEFAULT_TABLE_BYTES because it's not the max size, it's the only size. Also the size should really be expressed as sizeof(struct tsl2x7x_lux) * 3. In other words, 12 * 3 instead of 4 * 9. It's 36 bytes either way, so this doesn't change the behavior. Finally, I created the TSL2X7X_DEF_LUX_TABLE_SZ define instead of using the magic number 3. I declared the default tables using that define to hopefully signal to future programmers that if they want to use a different size they have to update all the related code. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lukas Wunner 提交于
Signed-off-by: NLukas Wunner <lukas@wunner.de> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lukas Wunner 提交于
The driver sets a .data pointer for each .compatible string but never calls of_device_get_match_data(). Instead, ADC properties are looked up with spi_get_device_id(). The .data pointer is therefore unnecessary, so drop it. Signed-off-by: NLukas Wunner <lukas@wunner.de> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lukas Wunner 提交于
Single-channel converters such as mcp3001, mcp3201, mcp3301 and the upcoming mcp3550/1/3 lack a MOSI pin, so there's no need to call mcp320x_channel_to_tx_data() for them. Moreover, instead of calling spi_read() for these converters, which generates an spi_message and spi_transfer on the stack on every readout, it's more efficient to use the spi_message and spi_transfer[] included in struct mcp320x (as we do for multi-channel ADCs), but initialize the spi_message only with the receive transfer. Signed-off-by: NLukas Wunner <lukas@wunner.de> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Narcisa Ana Maria Vasile 提交于
Add data ready trigger for hardware interrupts that signal new, available measurement samples. Cc: Daniel Baluta <daniel.baluta@gmail.com> Cc: Alison Schofield <amsfield22@gmail.com> Signed-off-by: NNarcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 22 9月, 2017 11 次提交
-
-
由 Colin Ian King 提交于
Don't populate const array LCDARefreshIndex on the stack, instead make it static. Makes the object code smaller by 340 bytes: Before: text data bss dec hex filename 84949 12336 0 97285 17c05 drivers/staging/xgifb/vb_setmode.o After: text data bss dec hex filename 84506 12432 0 96938 17aaa drivers/staging/xgifb/vb_setmode.o (gcc version 7.2.0 x86_64) Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
BCM2835_VCHIQ_SUPPORT_MEMDUMP lets you look through any user memory. That's too big of an information leak from a security perspective. The debugging dumps need to be more specific to this driver. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Janani Sankara Babu 提交于
This patch solves the warning "Using comparison to false is error prone" Signed-off-by: NJanani Sankara Babu <jananis37@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Janani Sankara Babu 提交于
This patch removes the semicolon at the end of while statement in the do while macro , inorder to avoid it behaving like compound statement. Signed-off-by: NJanani Sankara Babu <jananis37@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kees Cook 提交于
With timer initialization made unconditional, there is no reason to make del_timer_sync() calls conditionally, there by removing the test of the .data field. Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: devel@driverdev.osuosl.org Signed-off-by: NKees Cook <keescook@chromium.org> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Georgiana Chelu 提交于
Fix minor coding style issues found by checkpatch.pl. Signed-off-by: NGeorgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Georgiana Chelu 提交于
Fix issues find by checkpatch.pl. CHECK: Comparison to NULL could be written "!dongles" CHECK: Comparison to NULL could be written "!tasks" Signed-off-by: NGeorgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Georgiana Chelu 提交于
There is no need to initialize static variables to NULL because they are stored in .bss segment. This segment is initialized to 0 at the beginning of the code execution. Issue found by checkpatch.pl. ERROR: do not initialise statics to NULL Signed-off-by: NGeorgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Harsha Sharma 提交于
Remove typedef from struct as linux-kernel coding style tends to avoid using typedefs Done using following coccinelle semantic patch @r1@ type T; @@ typedef struct { ... } T; @script:python c1@ T2; T << r1.T; @@ if T[-2:] =="_t" or T[-2:] == "_T": coccinelle.T2 = T[:-2]; else: coccinelle.T2 = T; print T, coccinelle.T2 @r2@ type r1.T; identifier c1.T2; @@ -typedef struct + T2 { ... } -T ; @r3@ type r1.T; identifier c1.T2; @@ -T +struct T2 Signed-off-by: NHarsha Sharma <harshasharmaiitr@gmail.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Georgiana Chelu 提交于
Remove unnecessary messages because OOM (Out Of Memory Manager) reports memory allocation fail messages. The return value is clear regarding the problem, so there is no need for the 'out of memory' comments. Also, delete braces {} for single if statement blocks to improve the coding style. Fix issues found by by checkpatch.pl. WARNING: Possible unnecessary 'out of memory' message. WARNING: braces {} are not necessary for single statement blocks Signed-off-by: NGeorgiana Chelu <georgiana.chelu93@example.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Georgiana Chelu 提交于
Replace printk with netdev_info because struct ieee80211_device contains a net_device structure. Issue found by checkpatch.pl script. WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: NGeorgiana Chelu <georgiana.chelu93@example.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 18 9月, 2017 11 次提交
-
-
由 Nadav Amit 提交于
rq_reqbuf is allocated using kvmalloc() but released in one occasion using kfree() instead of kvfree(). The issue was found using grep based on a similar bug. Fixes: d7e09d03 ("add Lustre file system client support") Fixes: ee0ec194 ("lustre: ptlrpc: Replace uses of OBD_{ALLOC,FREE}_LARGE") Cc: Peng Tao <bergwolf@gmail.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: James Simmons <jsimmons@infradead.org> Signed-off-by: NNadav Amit <namit@vmware.com> Signed-off-by: NAndreas Dilger <andreas.dilger@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Colin Ian King 提交于
txbuf16 is being initialized at declaration time and then later set to another value without it being read inbetween, hence making the initialization redundant. Fix this by setting txbuf16 just the once. Also clean up some incorrect indentations. Cleans up clang build warning: warning: Value stored to 'txbuf16' during its initialization is never read Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Colin Ian King 提交于
Variable idx is being set but never read and thus it can be removed because it is redundant. Cleans up clang build warnings: warning: Value stored to 'idx' during its initialization is never read warning: Value stored to 'idx' is never read warning: Value stored to 'idx' is never read Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Castulo J. Martinez 提交于
Remove unnecessary parentheses from if statements to make the code easier to read. Issue found by checkpatch. Signed-off-by: NCastulo J. Martinez <castulo.martinez@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Valentine Sinitsyn 提交于
rtl8188eu contains some spelling errors in comment lines as well as in constants. Harmless as they are, they still make the code feel a bit unclean, which is not something we want in the kernel. Improve this by fixing typos so they won't catch eyes of future driver developers anymore. Signed-off-by: NWolfgang Hartmann <wolfgang.hartmann@siemens.com> Signed-off-by: NManish Shrestha <manishshrestha2006@gmail.com> Signed-off-by: NValentine Sinitsyn <valentine.sinitsyn@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Greg Kroah-Hartman 提交于
It's already in a .h file, don't redefine it as the compiler doesn't like it if it does not match identically. Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Aastha Gupta 提交于
Fixes checkpatch.pl error: ERROR: open brace '{' following function declarations go on the next line Signed-off-by: NAastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Aastha Gupta 提交于
Fixex checkpatch.pl warning: WARNING: space prohibited before semicolon Signed-off-by: NAastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Aastha Gupta 提交于
Fixes 'space required after ','', reported by checkpatch.pl Signed-off-by: NAastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Aastha Gupta 提交于
Fixes checkpatch.pl warning: WARNING: Unnecessary space before function pointer arguments Signed-off-by: NAastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Aastha Gupta 提交于
Fixes checkpatch.pl error: ERROR: open brace '{' following enum go on the same line Signed-off-by: NAastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-