linux-stable/drivers/iio
Julia Lawall ce7c637a83 iio: potentiometer: merge calls to of_match_device and of_device_get_match_data
Drop call to of_match_device, which is subsumed by the subsequent
call to of_device_get_match_data.  The code becomes simpler, and a
temporary variable can be dropped.

The semantic match that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
local idexpression match;
identifier i;
expression x, dev, e, e1;
@@
-        match@i = of_match_device(x, dev);
-        if (match) e = of_device_get_match_data(dev);
-        else e = e1;
+        e = of_device_get_match_data(dev);
+        if (!e) e = e1;

@@
identifier r.i;
@@
- const struct of_device_id *i;
... when != i
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19 20:16:39 +01:00
..
accel iio: adxl345: move null check for i2c id at start of probe 2018-08-19 18:32:05 +01:00
adc iio: adc: add support for mcp3911 2018-08-19 20:02:48 +01:00
afe iio: afe: rescale: new driver 2018-04-28 18:03:22 +01:00
amplifiers drivers: iio: Update MODULE AUTHOR email address 2018-08-19 17:23:39 +01:00
buffer iio:kfifo_buf: check for uint overflow 2018-03-30 11:16:12 +01:00
chemical iio: chemical: bme680: Add check for val2 in the write_raw function 2018-08-19 20:07:25 +01:00
common iio: change strncpy+truncation to strlcpy 2018-07-15 11:38:06 +01:00
counter iio: 104-quad-8: Provide defines for magic numbers 2018-06-10 11:52:30 +01:00
dac iio: dac: mcp4725: avoid using CONFIG_PM_SLEEP 2018-08-19 17:42:21 +01:00
dummy iio:dummy: Add extra paragraphs on Kconfig 2018-03-03 15:20:16 +00:00
frequency drivers: iio: Update MODULE AUTHOR email address 2018-08-19 17:23:39 +01:00
gyro iio: Replace occurrences of magic number 0 by IIO_CHAN_INFO_RAW 2018-03-07 20:14:36 +00:00
health iio: health: max30102: Mark expected switch fall-throughs 2018-08-19 17:21:35 +01:00
humidity iio: add SPDX identifier for various drivers 2018-02-18 11:55:19 +00:00
imu iio: imu: mpu6050: add support for regulator framework 2018-08-18 18:11:46 +01:00
light iio: max44000: remove unused variable max44000_alstim_shift 2018-08-19 18:28:26 +01:00
magnetometer iio: magnetometer: mag3110: Add ability to run in continuous mode 2018-05-12 11:01:59 +01:00
multiplexer treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
orientation
potentiometer iio: potentiometer: merge calls to of_match_device and of_device_get_match_data 2018-08-19 20:16:39 +01:00
potentiostat iio: potentiostat: lmp91000: add LMP91002 support 2018-05-12 11:02:44 +01:00
pressure iio: pressure: ms5611: remove deprecated compatible strings 2018-08-19 17:15:43 +01:00
proximity iio: light: isl29501: Add support for the ISL29501 ToF sensor. 2018-07-23 19:18:10 +01:00
resolver staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00
temperature iio temperature/mlx90632: silence a static checker warning 2018-02-24 13:32:05 +00:00
trigger drivers: iio: Update MODULE AUTHOR email address 2018-08-19 17:23:39 +01:00
iio_core.h
iio_core_trigger.h
industrialio-buffer.c First round of IIO fixes for the 4.16 cycle. 2018-02-20 10:03:22 +01:00
industrialio-configfs.c
industrialio-core.c iio: Add modifier for DUV light 2018-07-23 19:18:10 +01:00
industrialio-event.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
Kconfig staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00
Makefile staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00