aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_info.c
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2010-05-27 15:40:25 -0400
committerDave Airlie <airlied@redhat.com>2010-05-31 20:07:39 -0400
commitdcdb167402cbdca1d021bdfa5f63995ee0a79317 (patch)
tree3cd0ab1189d972b59daaaf863f518d7b94d2de7a /drivers/gpu/drm/drm_info.c
parent01d73a6967f12fe6c4bbde1834a9fe662264a2eb (diff)
drm: Add support for platform devices to register as DRM devices
Allow platform devices without PCI resources to be DRM devices. [airlied: fixup warnings with dev pointers] Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_info.c')
-rw-r--r--drivers/gpu/drm/drm_info.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c
index f0f6c6b93f3a..2ef2c7827243 100644
--- a/drivers/gpu/drm/drm_info.c
+++ b/drivers/gpu/drm/drm_info.c
@@ -51,13 +51,24 @@ int drm_name_info(struct seq_file *m, void *data)
51 if (!master) 51 if (!master)
52 return 0; 52 return 0;
53 53
54 if (master->unique) { 54 if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) {
55 seq_printf(m, "%s %s %s\n", 55 if (master->unique) {
56 dev->driver->pci_driver.name, 56 seq_printf(m, "%s %s %s\n",
57 pci_name(dev->pdev), master->unique); 57 dev->driver->platform_device->name,
58 dev_name(dev->dev), master->unique);
59 } else {
60 seq_printf(m, "%s\n",
61 dev->driver->platform_device->name);
62 }
58 } else { 63 } else {
59 seq_printf(m, "%s %s\n", dev->driver->pci_driver.name, 64 if (master->unique) {
60 pci_name(dev->pdev)); 65 seq_printf(m, "%s %s %s\n",
66 dev->driver->pci_driver.name,
67 dev_name(dev->dev), master->unique);
68 } else {
69 seq_printf(m, "%s %s\n", dev->driver->pci_driver.name,
70 dev_name(dev->dev));
71 }
61 } 72 }
62 73
63 return 0; 74 return 0;