mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
ce7c637a83
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> |
||
---|---|---|
.. | ||
accel | ||
adc | ||
afe | ||
amplifiers | ||
buffer | ||
chemical | ||
common | ||
counter | ||
dac | ||
dummy | ||
frequency | ||
gyro | ||
health | ||
humidity | ||
imu | ||
light | ||
magnetometer | ||
multiplexer | ||
orientation | ||
potentiometer | ||
potentiostat | ||
pressure | ||
proximity | ||
resolver | ||
temperature | ||
trigger | ||
iio_core.h | ||
iio_core_trigger.h | ||
industrialio-buffer.c | ||
industrialio-configfs.c | ||
industrialio-core.c | ||
industrialio-event.c | ||
industrialio-sw-device.c | ||
industrialio-sw-trigger.c | ||
industrialio-trigger.c | ||
industrialio-triggered-event.c | ||
inkern.c | ||
Kconfig | ||
Makefile |