summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/boot
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2018-05-21 11:49:10 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-08-19 21:16:39 +0200
commitce7c637a8368d0293649a4acc0b89930295cb62a (patch)
treec77397ced609bd7f428bf0cd1c2216a1c2174c50 /arch/microblaze/boot
parentiio: chemical: bme680: Add check for val2 in the write_raw function (diff)
downloadlinux-ce7c637a8368d0293649a4acc0b89930295cb62a.tar.xz
linux-ce7c637a8368d0293649a4acc0b89930295cb62a.zip
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>
Diffstat (limited to 'arch/microblaze/boot')
0 files changed, 0 insertions, 0 deletions