media: staging/cxd2099: convert to regmap API
authorDaniel Scheller <d.scheller@gmx.net>
Sat, 17 Feb 2018 15:03:23 +0000 (10:03 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Mar 2018 13:48:17 +0000 (08:48 -0500)
commit81a705914b77e700ce142892c1f839488200099d
treee05985f9be2c3af10430eb14e5017b24ce8aa20b
parent9403f089bfa0536dbad1a28419aff037dc575c3d
media: staging/cxd2099: convert to regmap API

Convert the cxd2099 driver to use regmap for I2C accesses, removing all
own i2c_*() functions. With that, make the driver a proper I2C client
driver. This also adds the benefit of having a proper cleanup function
(cxd2099_remove() in this case) that takes care of resource cleanup
upon I2C client deregistration.

At this point, keep the static inline declared cxd2099_attach()
function so that drivers using the legacy/proprietary style attach way
still compile, albeit lacking the cxd2099 driver functionality. This
is taken care of in the next two patches.

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Jasmin Jessich <jasmin@anw.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/cxd2099/cxd2099.c
drivers/staging/media/cxd2099/cxd2099.h