diff options
| author | Sakari Ailus <[email protected]> | 2023-05-15 09:06:50 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2023-07-28 08:47:56 +0000 |
| commit | c91fd7b7a8ae17ab8be0b6e765e4a38783749330 (patch) | |
| tree | 576dc031d35525df11aefea46ad4ea7d5d7558f6 /drivers/media/v4l2-core/v4l2-async.c | |
| parent | media: v4l: async: Rework internal lists (diff) | |
| download | kernel-c91fd7b7a8ae17ab8be0b6e765e4a38783749330.tar.gz kernel-c91fd7b7a8ae17ab8be0b6e765e4a38783749330.zip | |
media: v4l: async: Obtain async connection based on sub-device
Add v4l2_async_connection_unique() function for obtaining a struct
v4l2_async_connection, typically allocated by drivers together with their
own information on an external sub-device.
The relation between connections and sub-devices still remains 1:1 but
this code becomes more complex when the relation soon changes.
Signed-off-by: Sakari Ailus <[email protected]>
Tested-by: Philipp Zabel <[email protected]> # imx6qp
Tested-by: Niklas Söderlund <[email protected]> # rcar + adv746x
Tested-by: Aishwarya Kothari <[email protected]> # Apalis i.MX6Q with TC358743
Tested-by: Lad Prabhakar <[email protected]> # Renesas RZ/G2L SMARC
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-async.c')
| -rw-r--r-- | drivers/media/v4l2-core/v4l2-async.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index 95fecf39ba65..cb962b0fc2bc 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -751,6 +751,13 @@ __v4l2_async_nf_add_i2c(struct v4l2_async_notifier *notifier, int adapter_id, } EXPORT_SYMBOL_GPL(__v4l2_async_nf_add_i2c); +struct v4l2_async_connection * +v4l2_async_connection_unique(struct v4l2_subdev *sd) +{ + return sd->asd; +} +EXPORT_SYMBOL_GPL(v4l2_async_connection_unique); + int v4l2_async_register_subdev(struct v4l2_subdev *sd) { struct v4l2_async_notifier *subdev_notifier; |
