drm/i2c: tda998x: always use the same device for all kernel messages
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 7 Feb 2014 19:13:23 +0000 (19:13 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 14 Feb 2014 20:11:12 +0000 (20:11 +0000)
Rather than using a mixture of the parent DRM device and the component
device for messages from the driver, consistently use the component
device for all messages.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/gpu/drm/i2c/tda998x_drv.c

index d0f3a4cbb8665ad7512d813ce19ab205ba29b889..48af5cac1902bbfa1360ee0a76918701baf83739 100644 (file)
@@ -1044,7 +1044,7 @@ read_edid_block(struct drm_encoder *encoder, uint8_t *buf, int blk)
                                        !priv->wq_edid_wait,
                                        msecs_to_jiffies(100));
                if (i < 0) {
-                       dev_err(encoder->dev->dev, "read edid wait err %d\n", i);
+                       dev_err(&priv->hdmi->dev, "read edid wait err %d\n", i);
                        return i;
                }
        } else {
@@ -1059,14 +1059,14 @@ read_edid_block(struct drm_encoder *encoder, uint8_t *buf, int blk)
        }
 
        if (i == 0) {
-               dev_err(encoder->dev->dev, "read edid timeout\n");
+               dev_err(&priv->hdmi->dev, "read edid timeout\n");
                return -ETIMEDOUT;
        }
 
        ret = reg_read_range(priv, REG_EDID_DATA_0, buf, EDID_LENGTH);
        if (ret != EDID_LENGTH) {
-               dev_err(encoder->dev->dev, "failed to read edid block %d: %d\n",
-                               blk, ret);
+               dev_err(&priv->hdmi->dev, "failed to read edid block %d: %d\n",
+                       blk, ret);
                return ret;
        }
 
@@ -1132,7 +1132,7 @@ done:
 fail:
        if (priv->rev == TDA19988)
                reg_set(priv, REG_TX4, TX4_PD_RAM);
-       dev_warn(encoder->dev->dev, "failed to read EDID\n");
+       dev_warn(&priv->hdmi->dev, "failed to read EDID\n");
        kfree(block);
        return NULL;
 }