summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-diolan-u2c.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2018-05-21 12:49:08 +0300
committerPeter Rosin <peda@axentia.se>2018-05-24 14:51:25 +0300
commitb10d7a1fd6fcb16f242ffbd87bf0466b337708d6 (patch)
tree9b020bb2c0eb843d59471f6b68c9094f0d9b2568 /drivers/i2c/busses/i2c-diolan-u2c.c
parent5a9dcd81908bb2bc6d8ed22bc4b7eec191024557 (diff)
downloadlinux-b10d7a1fd6fcb16f242ffbd87bf0466b337708d6.tar.xz
i2c: mux: pca954x: 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> Signed-off-by: Peter Rosin <peda@axentia.se>
Diffstat (limited to 'drivers/i2c/busses/i2c-diolan-u2c.c')
0 files changed, 0 insertions, 0 deletions