Merge branch 'drm-tda998x-mali' of git://git.armlinux.org.uk/~rmk/linux-arm into...
[muen/linux.git] / drivers / gpu / drm / arm / hdlcd_drv.c
index 85aec8b86d898de6c6abc4bedff864c9f8b93772..faab7f9bd3b75bdacd99755c1bf9e567439aadfb 100644 (file)
@@ -268,9 +268,7 @@ static const struct file_operations fops = {
        .open           = drm_open,
        .release        = drm_release,
        .unlocked_ioctl = drm_ioctl,
-#ifdef CONFIG_COMPAT
        .compat_ioctl   = drm_compat_ioctl,
-#endif
        .poll           = drm_poll,
        .read           = drm_read,
        .llseek         = noop_llseek,
@@ -326,8 +324,8 @@ static int hdlcd_drm_bind(struct device *dev)
                return -ENOMEM;
 
        drm = drm_dev_alloc(&hdlcd_driver, dev);
-       if (!drm)
-               return -ENOMEM;
+       if (IS_ERR(drm))
+               return PTR_ERR(drm);
 
        drm->dev_private = hdlcd;
        dev_set_drvdata(dev, drm);
@@ -456,7 +454,8 @@ static int hdlcd_probe(struct platform_device *pdev)
                return -EAGAIN;
        }
 
-       component_match_add(&pdev->dev, &match, compare_dev, port);
+       drm_of_component_match_add(&pdev->dev, &match, compare_dev, port);
+       of_node_put(port);
 
        return component_master_add_with_match(&pdev->dev, &hdlcd_master_ops,
                                               match);