Merge tag 'drm-misc-next-2017-11-30' of git://anongit.freedesktop.org/drm/drm-misc...
[linux-block.git] / drivers / gpu / drm / i2c / tda998x_drv.c
index 60981505763cbecd81471a08549f3ac74c3e6d53..cd3f0873bbddabe41845bf08d3fde399c09290f6 100644 (file)
@@ -601,9 +601,9 @@ tda998x_reset(struct tda998x_priv *priv)
  * we have seen a HPD inactive->active transition.  This code implements
  * that delay.
  */
-static void tda998x_edid_delay_done(unsigned long data)
+static void tda998x_edid_delay_done(struct timer_list *t)
 {
-       struct tda998x_priv *priv = (struct tda998x_priv *)data;
+       struct tda998x_priv *priv = from_timer(priv, t, edid_delay_timer);
 
        priv->edid_delay_active = false;
        wake_up(&priv->edid_delay_waitq);
@@ -1491,8 +1491,7 @@ static int tda998x_create(struct i2c_client *client, struct tda998x_priv *priv)
 
        mutex_init(&priv->mutex);       /* protect the page access */
        init_waitqueue_head(&priv->edid_delay_waitq);
-       setup_timer(&priv->edid_delay_timer, tda998x_edid_delay_done,
-                   (unsigned long)priv);
+       timer_setup(&priv->edid_delay_timer, tda998x_edid_delay_done, 0);
        INIT_WORK(&priv->detect_work, tda998x_detect_work);
 
        /* wake up the device: */