[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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

szülő
cf2113ca56
commit
f51e80804f
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user