summaryrefslogtreecommitdiffstats
path: root/Documentation/media/kapi
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2016-11-25 06:23:34 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-29 12:07:17 -0200
commitf51e80804f084de269954d875c0892b081b7df3c (patch)
treecc8711c8323e5ff7fb69599b7dc2aa88c9fd438e /Documentation/media/kapi
parentcf2113ca563191a9ee5943561827e50ad8cda4e0 (diff)
downloadblackbird-op-linux-f51e80804f084de269954d875c0892b081b7df3c.tar.gz
blackbird-op-linux-f51e80804f084de269954d875c0892b081b7df3c.zip
[media] cec: pass parent device in register(), not allocate()
The cec_allocate_adapter function doesn't need the parent device, only the cec_register_adapter function needs it. Drop the cec_devnode parent field, since devnode.dev.parent can be used instead. This change makes the framework consistent with other frameworks where the parent device is not used until the device is registered. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation/media/kapi')
-rw-r--r--Documentation/media/kapi/cec-core.rst14
1 files changed, 6 insertions, 8 deletions
diff --git a/Documentation/media/kapi/cec-core.rst b/Documentation/media/kapi/cec-core.rst
index 8a88dd4ce3d4..81c6d8e93774 100644
--- a/Documentation/media/kapi/cec-core.rst
+++ b/Documentation/media/kapi/cec-core.rst
@@ -37,9 +37,8 @@ The struct cec_adapter represents the CEC adapter hardware. It is created by
calling cec_allocate_adapter() and deleted by calling cec_delete_adapter():
.. c:function::
- struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
- void *priv, const char *name, u32 caps, u8 available_las,
- struct device *parent);
+ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, void *priv,
+ const char *name, u32 caps, u8 available_las);
.. c:function::
void cec_delete_adapter(struct cec_adapter *adap);
@@ -66,20 +65,19 @@ available_las:
the number of simultaneous logical addresses that this
adapter can handle. Must be 1 <= available_las <= CEC_MAX_LOG_ADDRS.
-parent:
- the parent device.
-
To register the /dev/cecX device node and the remote control device (if
CEC_CAP_RC is set) you call:
.. c:function::
- int cec_register_adapter(struct cec_adapter \*adap);
+ int cec_register_adapter(struct cec_adapter *adap, struct device *parent);
+
+where parent is the parent device.
To unregister the devices call:
.. c:function::
- void cec_unregister_adapter(struct cec_adapter \*adap);
+ void cec_unregister_adapter(struct cec_adapter *adap);
Note: if cec_register_adapter() fails, then call cec_delete_adapter() to
clean up. But if cec_register_adapter() succeeded, then only call
OpenPOWER on IntegriCloud