drm: use dev_name as default unique name in drm_dev_alloc()
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Fri, 11 Dec 2015 10:20:28 +0000 (11:20 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 15 Dec 2015 12:56:06 +0000 (13:56 +0100)
commite112e593b215c394c0303dbf0534db0928e87967
tree7ef5b51564766ad2dfe25bc5e8a9dd82a71116c1
parent399368aab39135cd9bc5e20b55b8b4d48658f904
drm: use dev_name as default unique name in drm_dev_alloc()

The following code pattern exists in some DRM drivers:

    ddev = drm_dev_alloc(&driver, parent_dev);
    drm_dev_set_unique(ddev, dev_name(parent_dev));

(Sometimes dev_name(ddev->dev) is used, which is the same.)

As suggested in
http://lists.freedesktop.org/archives/dri-devel/2015-December/096441.html,
the unique name of a new DRM device can be set as dev_name(parent_dev)
when parent_dev is not NULL (vgem is a special case).

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/rockchip/rockchip_drm_drv.c
drivers/gpu/drm/tegra/drm.c
drivers/gpu/drm/vc4/vc4_drv.c