]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: i2c: og01a1b: Replace client->dev usage
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 12 Aug 2025 21:45:28 +0000 (00:45 +0300)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 9 Sep 2025 13:59:18 +0000 (15:59 +0200)
commit4d58f671944a16314f03d3c0c40ee69058ca02c9
tree3c514ea0f18cfa5a0b6fdeffde9e31e8bda4a795
parenteaa7d46d965412956c3ed1aed1213c20290f19c2
media: i2c: og01a1b: Replace client->dev usage

The driver needs to access the struct device in many places, and
retrieves it from the i2c_client itself retrieved with
v4l2_get_subdevdata(). Store it as a pointer in struct og01a1b and
access it from there instead, to simplify the driver.

While at it, fix a mistake in the sort order of include statements.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/og01a1b.c