]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: nvidia-gpu: refactor master_xfer
authorAjay Gupta <ajayg@nvidia.com>
Fri, 7 Jun 2019 16:34:19 +0000 (09:34 -0700)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 7 Jun 2019 22:09:08 +0000 (00:09 +0200)
commit06422eff3c81cfd23ecb03a54dfaed5d11b4b7ab
tree11d07c814ae6a5c07ad000ebaf4613e6db960dbb
parent13a91a105ba7a7870120dae9f2a5f4589ec1f76c
i2c: nvidia-gpu: refactor master_xfer

Added a local variable "send_stop" to simplify "goto" statements.

The "send_stop" handles below two case
1) When first i2c start fails and so i2c stop is not sent before
exiting

2) When i2c stop failed after all transfers and we do not need to
send another stop before exiting.

Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-nvidia-gpu.c