drm: encoder_slave: use new I2C API
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 15 Jun 2020 07:58:11 +0000 (09:58 +0200)
committerWolfram Sang <wsa@kernel.org>
Fri, 19 Jun 2020 07:20:21 +0000 (09:20 +0200)
commitbb7d93fff62f32f4ff0072b2ace695bd5f5137e7
tree4cef7af640c220926fcab40f5e6793790adf16ea
parentf78d4032de60f50fd4afaa0fb68ea03b985f820a
drm: encoder_slave: use new I2C API

i2c_new_client() is deprecated, use the replacement
i2c_new_client_device(). Also, we have a helper to check if a driver is
bound. Use it to simplify the code. Note that this changes the errno for
a failed device creation from ENOMEM to ENODEV. No callers currently
interpret this errno, though, so we use this condensed error check.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/gpu/drm/drm_encoder_slave.c