HiOK, I will do it.
On Fri, Sep 19, 2014 at 7:47 AM, Mark yao <mark.yao@xxxxxxxxxxxxxx> wrote:
[snip]
+static int rockchip_drm_bind(struct device *dev)Please avoid drm_platform_*() usage. We're about to drop all the
+{
+ return drm_platform_init(&rockchip_drm_driver, to_platform_device(dev));
drm_bus midlayers. See the tegra driver how to do it, but basically
just this:
struct drm_device *ddev;
ddev = drm_dev_alloc(&rockchip_drm_driver, &to_platform_device(dev)->dev);
if (!ddev)
return -ENOMEM;
r = drm_dev_set_unique(ddev, dev_name(&ddev->dev));
if (r < 0) {
drm_dev_unref(ddev);
return r;
}
r = drm_dev_register(ddev);
if (r < 0) {
drm_dev_unref(ddev);
return r;
}
+}Please use:
+
+static void rockchip_drm_unbind(struct device *dev)
+{
+ drm_put_dev(dev_get_drvdata(dev));
struct drm_device *ddev = dev_get_drvdata(dev);
drm_dev_unregister(ddev);
drm_dev_unref(ddev);
Thanks
David