summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/st-cec
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 /drivers/staging/media/st-cec
parentcf2113ca563191a9ee5943561827e50ad8cda4e0 (diff)
downloadop-kernel-dev-f51e80804f084de269954d875c0892b081b7df3c.zip
op-kernel-dev-f51e80804f084de269954d875c0892b081b7df3c.tar.gz
[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 'drivers/staging/media/st-cec')
-rw-r--r--drivers/staging/media/st-cec/stih-cec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/media/st-cec/stih-cec.c b/drivers/staging/media/st-cec/stih-cec.c
index eed1fd6..3c25638 100644
--- a/drivers/staging/media/st-cec/stih-cec.c
+++ b/drivers/staging/media/st-cec/stih-cec.c
@@ -335,13 +335,12 @@ static int stih_cec_probe(struct platform_device *pdev)
cec->adap = cec_allocate_adapter(&sti_cec_adap_ops, cec,
CEC_NAME,
CEC_CAP_LOG_ADDRS | CEC_CAP_PASSTHROUGH |
- CEC_CAP_PHYS_ADDR | CEC_CAP_TRANSMIT,
- 1, &pdev->dev);
+ CEC_CAP_PHYS_ADDR | CEC_CAP_TRANSMIT, 1);
ret = PTR_ERR_OR_ZERO(cec->adap);
if (ret)
return ret;
- ret = cec_register_adapter(cec->adap);
+ ret = cec_register_adapter(cec->adap, &pdev->dev);
if (ret) {
cec_delete_adapter(cec->adap);
return ret;
OpenPOWER on IntegriCloud