Merge branch 'drm-tda998x-mali' of git://git.armlinux.org.uk/~rmk/linux-arm into...
[linux-2.6-microblaze.git] / drivers / gpu / drm / arm / hdlcd_drv.c
index 85aec8b..faab7f9 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);