]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: remove i2c_lock_adapter and use i2c_lock_bus directly
authorPeter Rosin <peda@axentia.se>
Wed, 20 Jun 2018 05:18:03 +0000 (07:18 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 12 Jul 2018 22:09:37 +0000 (00:09 +0200)
commit107dd8ab025bc0a252d5a12b8d75b4c1d3f9e28a
treeda04f58a00368bf8378f5a4dcf7fd4d90d41d8d4
parent67f4eb8d8326c478f129b336305b170e7d9be13b
i2c: remove i2c_lock_adapter and use i2c_lock_bus directly

The i2c_lock_adapter name is ambiguous since it is unclear if it
refers to the root adapter or the adapter you name in the argument.
The natural interpretation is the adapter you name in the argument,
but there are historical reasons for that not being the case; it
in fact locks the root adapter. Just remove the function and force
users to spell out the I2C_LOCK_ROOT_ADAPTER name to indicate what
is really going on. Also remove i2c_unlock_adapter, of course.

This patch was generated with

git grep -l 'i2c_\(un\)\?lock_adapter' \
| xargs sed -i 's/i2c_\(un\)\?lock_adapter(\([^)]*\))/'\
'i2c_\1lock_bus(\2, I2C_LOCK_ROOT_ADAPTER)/g'

followed by white-space touch-up.

Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-brcmstb.c
drivers/i2c/busses/i2c-davinci.c
drivers/i2c/busses/i2c-gpio.c
drivers/i2c/busses/i2c-s3c2410.c
drivers/i2c/busses/i2c-sprd.c
drivers/i2c/i2c-core-slave.c
drivers/iio/temperature/mlx90614.c
include/linux/i2c.h