]> Pileus Git - ~andy/linux/blobdiff - drivers/gpu/drm/drm_encoder_slave.c
Merge branch 'char-misc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
[~andy/linux] / drivers / gpu / drm / drm_encoder_slave.c
index f0184696edf3bef667b786e53488f0ed9c08aaa2..fb943551060e3b0f4fe1f75715c2a4ebb73329da 100644 (file)
@@ -24,6 +24,8 @@
  *
  */
 
+#include <linux/module.h>
+
 #include "drm_encoder_slave.h"
 
 /**
@@ -41,6 +43,9 @@
  * &drm_encoder_slave. The @slave_funcs field will be initialized with
  * the hooks provided by the slave driver.
  *
+ * If @info->platform_data is non-NULL it will be used as the initial
+ * slave config.
+ *
  * Returns 0 on success or a negative errno on failure, in particular,
  * -ENODEV is returned when no matching driver is found.
  */
@@ -85,6 +90,10 @@ int drm_i2c_encoder_init(struct drm_device *dev,
        if (err)
                goto fail_unregister;
 
+       if (info->platform_data)
+               encoder->slave_funcs->set_config(&encoder->base,
+                                                info->platform_data);
+
        return 0;
 
 fail_unregister: