lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 19 Sep 2014 15:04:34 +0200
From:	David Herrmann <dh.herrmann@...il.com>
To:	Mark yao <mark.yao@...k-chips.com>
Cc:	heiko@...ech.de,
	Boris BREZILLON <boris.brezillon@...e-electrons.com>,
	David Airlie <airlied@...il.com>,
	Rob Clark <robdclark@...il.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Randy Dunlap <rdunlap@...radead.org>,
	Grant Likely <grant.likely@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	John Stultz <john.stultz@...aro.org>,
	Rom Lemarchand <romlem@...gle.com>, devicetree@...r.kernel.org,
	linux-doc@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	Linux API <linux-api@...r.kernel.org>,
	linux-rockchip@...ts.infradead.org, dianders@...omium.org,
	St├ęphane Marchesin <marcheu@...omium.org>,
	dbehr@...omium.org, Olof Johansson <olof@...om.net>,
	Daniel Kurtz <djkurtz@...omium.org>, xjq@...k-chips.com,
	kfx@...k-chips.com, cym@...k-chips.com, cf@...k-chips.com,
	zyw@...k-chips.com, xxm@...k-chips.com, huangtao@...k-chips.com,
	kever.yang@...k-chips.com, yxj@...k-chips.com, wxt@...k-chips.com,
	xw@...k-chips.com
Subject: Re: [PATCH v3 1/5] drm/rockchip: Add basic drm driver

Hi

On Fri, Sep 19, 2014 at 7:47 AM, Mark yao <mark.yao@...k-chips.com> wrote:
[snip]
> +static int rockchip_drm_bind(struct device *dev)
> +{
> +       return drm_platform_init(&rockchip_drm_driver, to_platform_device(dev));

Please avoid drm_platform_*() usage. We're about to drop all the
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;
}

> +}
> +
> +static void rockchip_drm_unbind(struct device *dev)
> +{
> +       drm_put_dev(dev_get_drvdata(dev));

Please use:

struct drm_device *ddev = dev_get_drvdata(dev);

drm_dev_unregister(ddev);
drm_dev_unref(ddev);


Thanks
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists