i2c: add helper to check if a client has a driver attached
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 6 Nov 2019 21:21:01 +0000 (22:21 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 11 Dec 2019 07:39:07 +0000 (08:39 +0100)
commit8c9312a925ad859daefd0f443ef3b6dc7157d881
treef53aa271f4e1e307b31e081fe994c94a901fae19
parent3ac61258599b5abe45d97b926d44a79262385bae
i2c: add helper to check if a client has a driver attached

As a preparation for an API conversion, factor out something frequently
used in the media subsystem. As an improvement, it bails out on both,
NULL and ERRPTR to handle the old and new API.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
include/linux/i2c.h