diff options
author | Brian Starkey <brian.starkey@arm.com> | 2016-07-25 06:55:48 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2016-09-22 07:04:24 -0400 |
commit | 6a2925ea12006911c8180a89feda6d040873ed18 (patch) | |
tree | 4d6648221d17bf8a991d5b65b6e0df04ed49fec0 | |
parent | 0f2886057be322ddfa4858384c40a505f7a32a4a (diff) |
drm/i2c: tda998x: don't register the connector
The connector shouldn't be registered until the rest of the whole device
is set up, so that consistent state is presented to userspace.
As drm_dev_register() now registers all of the connectors anyway,
there's no need to explicitly do it in individual drivers so remove
the calls to drm_connector_register()/drm_connector_unregister().
This allows componentised drivers to use tda998x without having racy
initialisation.
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1469444148-19003-1-git-send-email-brian.starkey@arm.com
Link: http://patchwork.freedesktop.org/patch/msgid/545C835D.1050008@arm.com
-rw-r--r-- | drivers/gpu/drm/i2c/tda998x_drv.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 9798d400d817..088900d78ceb 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c | |||
@@ -1584,7 +1584,6 @@ const struct drm_connector_helper_funcs tda998x_connector_helper_funcs = { | |||
1584 | 1584 | ||
1585 | static void tda998x_connector_destroy(struct drm_connector *connector) | 1585 | static void tda998x_connector_destroy(struct drm_connector *connector) |
1586 | { | 1586 | { |
1587 | drm_connector_unregister(connector); | ||
1588 | drm_connector_cleanup(connector); | 1587 | drm_connector_cleanup(connector); |
1589 | } | 1588 | } |
1590 | 1589 | ||
@@ -1656,16 +1655,10 @@ static int tda998x_bind(struct device *dev, struct device *master, void *data) | |||
1656 | if (ret) | 1655 | if (ret) |
1657 | goto err_connector; | 1656 | goto err_connector; |
1658 | 1657 | ||
1659 | ret = drm_connector_register(&priv->connector); | ||
1660 | if (ret) | ||
1661 | goto err_sysfs; | ||
1662 | |||
1663 | drm_mode_connector_attach_encoder(&priv->connector, &priv->encoder); | 1658 | drm_mode_connector_attach_encoder(&priv->connector, &priv->encoder); |
1664 | 1659 | ||
1665 | return 0; | 1660 | return 0; |
1666 | 1661 | ||
1667 | err_sysfs: | ||
1668 | drm_connector_cleanup(&priv->connector); | ||
1669 | err_connector: | 1662 | err_connector: |
1670 | drm_encoder_cleanup(&priv->encoder); | 1663 | drm_encoder_cleanup(&priv->encoder); |
1671 | err_encoder: | 1664 | err_encoder: |
@@ -1678,7 +1671,6 @@ static void tda998x_unbind(struct device *dev, struct device *master, | |||
1678 | { | 1671 | { |
1679 | struct tda998x_priv *priv = dev_get_drvdata(dev); | 1672 | struct tda998x_priv *priv = dev_get_drvdata(dev); |
1680 | 1673 | ||
1681 | drm_connector_unregister(&priv->connector); | ||
1682 | drm_connector_cleanup(&priv->connector); | 1674 | drm_connector_cleanup(&priv->connector); |
1683 | drm_encoder_cleanup(&priv->encoder); | 1675 | drm_encoder_cleanup(&priv->encoder); |
1684 | tda998x_destroy(priv); | 1676 | tda998x_destroy(priv); |