.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * TDA9950 Consumer Electronics Control driver |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 as |
---|
6 | | - * published by the Free Software Foundation. |
---|
7 | 4 | * |
---|
8 | 5 | * The NXP TDA9950 implements the HDMI Consumer Electronics Control |
---|
9 | 6 | * interface. The host interface is similar to a mailbox: the data |
---|
.. | .. |
---|
423 | 420 | priv->hdmi = glue->parent; |
---|
424 | 421 | |
---|
425 | 422 | priv->adap = cec_allocate_adapter(&tda9950_cec_ops, priv, "tda9950", |
---|
426 | | - CEC_CAP_DEFAULTS, |
---|
| 423 | + CEC_CAP_DEFAULTS | |
---|
| 424 | + CEC_CAP_CONNECTOR_INFO, |
---|
427 | 425 | CEC_MAX_LOG_ADDRS); |
---|
428 | 426 | if (IS_ERR(priv->adap)) |
---|
429 | 427 | return PTR_ERR(priv->adap); |
---|
.. | .. |
---|
460 | 458 | if (ret < 0) |
---|
461 | 459 | return ret; |
---|
462 | 460 | |
---|
463 | | - priv->notify = cec_notifier_get(priv->hdmi); |
---|
| 461 | + priv->notify = cec_notifier_cec_adap_register(priv->hdmi, NULL, |
---|
| 462 | + priv->adap); |
---|
464 | 463 | if (!priv->notify) |
---|
465 | 464 | return -ENOMEM; |
---|
466 | 465 | |
---|
467 | 466 | ret = cec_register_adapter(priv->adap, priv->hdmi); |
---|
468 | 467 | if (ret < 0) { |
---|
469 | | - cec_notifier_put(priv->notify); |
---|
| 468 | + cec_notifier_cec_adap_unregister(priv->notify, priv->adap); |
---|
470 | 469 | return ret; |
---|
471 | 470 | } |
---|
472 | 471 | |
---|
.. | .. |
---|
476 | 475 | */ |
---|
477 | 476 | devm_remove_action(dev, tda9950_cec_del, priv); |
---|
478 | 477 | |
---|
479 | | - cec_register_cec_notifier(priv->adap, priv->notify); |
---|
480 | | - |
---|
481 | 478 | return 0; |
---|
482 | 479 | } |
---|
483 | 480 | |
---|
.. | .. |
---|
485 | 482 | { |
---|
486 | 483 | struct tda9950_priv *priv = i2c_get_clientdata(client); |
---|
487 | 484 | |
---|
| 485 | + cec_notifier_cec_adap_unregister(priv->notify, priv->adap); |
---|
488 | 486 | cec_unregister_adapter(priv->adap); |
---|
489 | | - cec_notifier_put(priv->notify); |
---|
490 | 487 | |
---|
491 | 488 | return 0; |
---|
492 | 489 | } |
---|