From: Dariusz Marcinkiewicz <darekm@google.com>
To: dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org,
hverkuil-cisco@xs4all.nl
Cc: Dariusz Marcinkiewicz <darekm@google.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Russell King <rmk+kernel@armlinux.org.uk>,
Hans Verkuil <hverkuil@xs4all.nl>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Enrico Weigelt <info@metux.net>,
Thomas Gleixner <tglx@linutronix.de>,
Colin Ian King <colin.king@canonical.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v7 4/9] tda9950: use cec_notifier_cec_adap_(un)register
Date: Wed, 14 Aug 2019 12:45:02 +0200 [thread overview]
Message-ID: <20190814104520.6001-5-darekm@google.com> (raw)
In-Reply-To: <20190814104520.6001-1-darekm@google.com>
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@google.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Tested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
drivers/gpu/drm/i2c/tda9950.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/gpu/drm/i2c/tda9950.c
index 8039fc0d83db4..a5a75bdeb7a5f 100644
--- a/drivers/gpu/drm/i2c/tda9950.c
+++ b/drivers/gpu/drm/i2c/tda9950.c
@@ -420,7 +420,8 @@ static int tda9950_probe(struct i2c_client *client,
priv->hdmi = glue->parent;
priv->adap = cec_allocate_adapter(&tda9950_cec_ops, priv, "tda9950",
- CEC_CAP_DEFAULTS,
+ CEC_CAP_DEFAULTS |
+ CEC_CAP_CONNECTOR_INFO,
CEC_MAX_LOG_ADDRS);
if (IS_ERR(priv->adap))
return PTR_ERR(priv->adap);
@@ -457,13 +458,14 @@ static int tda9950_probe(struct i2c_client *client,
if (ret < 0)
return ret;
- priv->notify = cec_notifier_get(priv->hdmi);
+ priv->notify = cec_notifier_cec_adap_register(priv->hdmi, NULL,
+ priv->adap);
if (!priv->notify)
return -ENOMEM;
ret = cec_register_adapter(priv->adap, priv->hdmi);
if (ret < 0) {
- cec_notifier_put(priv->notify);
+ cec_notifier_cec_adap_unregister(priv->notify);
return ret;
}
@@ -473,8 +475,6 @@ static int tda9950_probe(struct i2c_client *client,
*/
devm_remove_action(dev, tda9950_cec_del, priv);
- cec_register_cec_notifier(priv->adap, priv->notify);
-
return 0;
}
@@ -482,8 +482,8 @@ static int tda9950_remove(struct i2c_client *client)
{
struct tda9950_priv *priv = i2c_get_clientdata(client);
+ cec_notifier_cec_adap_unregister(priv->notify);
cec_unregister_adapter(priv->adap);
- cec_notifier_put(priv->notify);
return 0;
}
--
2.23.0.rc1.153.gdeed80330f-goog
next prev parent reply other threads:[~2019-08-14 10:46 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 10:44 [PATCH v7 0/9] drm: cec: convert DRM drivers to the new notifier API Dariusz Marcinkiewicz
2019-08-14 10:44 ` [PATCH v7 1/9] drm_dp_cec: add connector info support Dariusz Marcinkiewicz
2019-08-15 18:10 ` Lyude Paul
2019-08-26 9:05 ` Ben Skeggs
2019-08-22 8:08 ` Hans Verkuil
2019-08-26 9:00 ` Hans Verkuil
2019-08-28 15:05 ` Ville Syrjälä
2019-08-14 10:45 ` [PATCH v7 2/9] drm/i915/intel_hdmi: use cec_notifier_conn_(un)register Dariusz Marcinkiewicz
2019-08-22 8:03 ` Hans Verkuil
2019-08-26 8:59 ` Hans Verkuil
2019-08-26 12:08 ` Ville Syrjälä
2019-08-14 10:45 ` [PATCH v7 3/9] dw-hdmi-cec: use cec_notifier_cec_adap_(un)register Dariusz Marcinkiewicz
2019-08-19 14:35 ` Neil Armstrong
2019-08-20 7:48 ` Neil Armstrong
2019-08-14 10:45 ` Dariusz Marcinkiewicz [this message]
2019-08-14 10:45 ` [PATCH v7 5/9] drm: tda998x: use cec_notifier_conn_(un)register Dariusz Marcinkiewicz
2019-08-19 9:30 ` Hans Verkuil
2019-08-19 11:22 ` [PATCH v7.1 " Dariusz Marcinkiewicz
2019-08-28 7:15 ` [PATCH v7.2 " Dariusz Marcinkiewicz
2019-08-25 13:12 ` [PATCH v7 " Hans Verkuil
2019-08-28 7:18 ` Dariusz Marcinkiewicz
2019-08-14 10:45 ` [PATCH v7 6/9] drm: sti: " Dariusz Marcinkiewicz
2019-08-19 9:34 ` Hans Verkuil
2019-08-22 8:11 ` Hans Verkuil
2019-09-02 13:11 ` Benjamin Gaignard
2019-08-14 10:45 ` [PATCH v7 7/9] drm: tegra: " Dariusz Marcinkiewicz
2019-08-19 9:33 ` Hans Verkuil
2019-08-28 8:09 ` Hans Verkuil
2019-08-28 9:38 ` Thierry Reding
2019-08-28 10:06 ` Hans Verkuil
2019-08-28 11:54 ` Thierry Reding
2019-10-04 8:48 ` Hans Verkuil
2019-10-14 7:51 ` Hans Verkuil
2019-08-28 9:36 ` Thierry Reding
2019-10-14 12:17 ` Thierry Reding
2019-08-14 10:45 ` [PATCH v7 8/9] drm: dw-hdmi: " Dariusz Marcinkiewicz
2019-08-19 9:32 ` Hans Verkuil
2019-08-19 14:05 ` Hans Verkuil
2019-08-19 14:38 ` Neil Armstrong
2019-08-19 14:41 ` Hans Verkuil
2019-08-19 14:47 ` Neil Armstrong
2019-08-20 7:48 ` Neil Armstrong
2019-08-14 10:45 ` [PATCH v7 9/9] drm: exynos: exynos_hdmi: " Dariusz Marcinkiewicz
2019-08-19 9:32 ` Hans Verkuil
2019-08-28 8:39 ` Sylwester Nawrocki
2019-08-28 12:34 ` [PATCH v7.1 " Dariusz Marcinkiewicz
2019-08-28 12:38 ` [PATCH v7 " Dariusz Marcinkiewicz
2019-08-19 9:38 ` [PATCH v7 0/9] drm: cec: convert DRM drivers to the new notifier API Hans Verkuil
2019-08-19 11:28 ` Dariusz Marcinkiewicz
2019-08-19 12:00 ` Hans Verkuil
2019-08-19 14:48 ` Neil Armstrong
2019-08-19 14:55 ` Hans Verkuil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190814104520.6001-5-darekm@google.com \
--to=darekm@google.com \
--cc=airlied@linux.ie \
--cc=colin.king@canonical.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=hverkuil@xs4all.nl \
--cc=info@metux.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).