diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2016-11-25 06:23:34 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-29 12:07:17 -0200 |
commit | f51e80804f084de269954d875c0892b081b7df3c (patch) | |
tree | cc8711c8323e5ff7fb69599b7dc2aa88c9fd438e /drivers/media/usb/pulse8-cec | |
parent | cf2113ca563191a9ee5943561827e50ad8cda4e0 (diff) | |
download | blackbird-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 'drivers/media/usb/pulse8-cec')
-rw-r--r-- | drivers/media/usb/pulse8-cec/pulse8-cec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/usb/pulse8-cec/pulse8-cec.c b/drivers/media/usb/pulse8-cec/pulse8-cec.c index 9092494bb43c..7c18daeb0ade 100644 --- a/drivers/media/usb/pulse8-cec/pulse8-cec.c +++ b/drivers/media/usb/pulse8-cec/pulse8-cec.c @@ -659,7 +659,7 @@ static int pulse8_connect(struct serio *serio, struct serio_driver *drv) pulse8->serio = serio; pulse8->adap = cec_allocate_adapter(&pulse8_cec_adap_ops, pulse8, - "HDMI CEC", caps, 1, &serio->dev); + "HDMI CEC", caps, 1); err = PTR_ERR_OR_ZERO(pulse8->adap); if (err < 0) goto free_device; @@ -679,7 +679,7 @@ static int pulse8_connect(struct serio *serio, struct serio_driver *drv) if (err) goto close_serio; - err = cec_register_adapter(pulse8->adap); + err = cec_register_adapter(pulse8->adap, &serio->dev); if (err < 0) goto close_serio; |