Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
[cascardo/linux.git] / drivers / gpu / drm / exynos / exynos_drm_g2d.c
index fb2f81b..3b0da03 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/workqueue.h>
 #include <linux/dma-mapping.h>
 #include <linux/dma-attrs.h>
+#include <linux/of.h>
 
 #include <drm/drmP.h>
 #include <drm/exynos_drm.h>
@@ -429,7 +430,7 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev,
 
        g2d_userptr->pages = pages;
 
-       sgt = kzalloc(sizeof *sgt, GFP_KERNEL);
+       sgt = kzalloc(sizeof(*sgt), GFP_KERNEL);
        if (!sgt) {
                DRM_ERROR("failed to allocate sg table.\n");
                ret = -ENOMEM;
@@ -1239,6 +1240,14 @@ static int g2d_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume);
 
+#ifdef CONFIG_OF
+static const struct of_device_id exynos_g2d_match[] = {
+       { .compatible = "samsung,exynos5250-g2d" },
+       {},
+};
+MODULE_DEVICE_TABLE(of, exynos_g2d_match);
+#endif
+
 struct platform_driver g2d_driver = {
        .probe          = g2d_probe,
        .remove         = g2d_remove,
@@ -1246,5 +1255,6 @@ struct platform_driver g2d_driver = {
                .name   = "s5p-g2d",
                .owner  = THIS_MODULE,
                .pm     = &g2d_pm_ops,
+               .of_match_table = of_match_ptr(exynos_g2d_match),
        },
 };