On 7/16/19 9:58 AM, Dariusz Marcinkiewicz wrote: > Use the new cec_notifier_cec_adap_(un)register() functions to > (un)register the notifier for the CEC adapter. > > Signed-off-by: Dariusz Marcinkiewicz <darekm@xxxxxxxxxx> > Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c > index 6c323510f1288..6f7ecacb7d1fb 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c > @@ -281,13 +281,14 @@ static int dw_hdmi_cec_probe(struct platform_device *pdev) The CEC_CAP_CONNECTOR_INFO should be added to cec_allocate_adapter. And while we're at it, let's use CEC_CAP_DEFAULTS instead of CEC_CAP_LOG_ADDRS | CEC_CAP_TRANSMIT | CEC_CAP_RC | CEC_CAP_PASSTHROUGH. Regards, Hans > if (ret < 0) > return ret; > > - cec->notify = cec_notifier_get(pdev->dev.parent); > + cec->notify = cec_notifier_cec_adap_register(pdev->dev.parent, > + NULL, cec->adap); > if (!cec->notify) > return -ENOMEM; > > ret = cec_register_adapter(cec->adap, pdev->dev.parent); > if (ret < 0) { > - cec_notifier_put(cec->notify); > + cec_notifier_cec_adap_unregister(cec->notify); > return ret; > } > > @@ -297,8 +298,6 @@ static int dw_hdmi_cec_probe(struct platform_device *pdev) > */ > devm_remove_action(&pdev->dev, dw_hdmi_cec_del, cec); > > - cec_register_cec_notifier(cec->adap, cec->notify); > - > return 0; > } > > @@ -306,8 +305,8 @@ static int dw_hdmi_cec_remove(struct platform_device *pdev) > { > struct dw_hdmi_cec *cec = platform_get_drvdata(pdev); > > + cec_notifier_cec_adap_unregister(cec->notify); > cec_unregister_adapter(cec->adap); > - cec_notifier_put(cec->notify); > > return 0; > } >