diff options
author | Dave Airlie <airlied@gmail.com> | 2010-12-14 12:16:38 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-02-06 22:09:36 -0500 |
commit | 8410ea3b95d105a5be5db501656f44bbb91197c1 (patch) | |
tree | 6cd27f207e50c13ba2f4a78d6323bc23f751e380 /drivers/gpu/drm/drm_info.c | |
parent | ff72145badb834e8051719ea66e024784d000cb4 (diff) |
drm: rework PCI/platform driver interface.
This abstracts the pci/platform interface out a step further,
we can go further but this is far enough for now to allow USB
to be plugged in.
The drivers now just call the init code directly for their
device type.
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.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c index 3cdbaf379bb5..812aaac4438a 100644 --- a/drivers/gpu/drm/drm_info.c +++ b/drivers/gpu/drm/drm_info.c | |||
@@ -47,30 +47,19 @@ int drm_name_info(struct seq_file *m, void *data) | |||
47 | struct drm_minor *minor = node->minor; | 47 | struct drm_minor *minor = node->minor; |
48 | struct drm_device *dev = minor->dev; | 48 | struct drm_device *dev = minor->dev; |
49 | struct drm_master *master = minor->master; | 49 | struct drm_master *master = minor->master; |
50 | 50 | const char *bus_name; | |
51 | if (!master) | 51 | if (!master) |
52 | return 0; | 52 | return 0; |
53 | 53 | ||
54 | if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) { | 54 | bus_name = dev->driver->bus->get_name(dev); |
55 | if (master->unique) { | 55 | if (master->unique) { |
56 | seq_printf(m, "%s %s %s\n", | 56 | seq_printf(m, "%s %s %s\n", |
57 | dev->driver->platform_device->name, | 57 | bus_name, |
58 | dev_name(dev->dev), master->unique); | 58 | dev_name(dev->dev), master->unique); |
59 | } else { | ||
60 | seq_printf(m, "%s\n", | ||
61 | dev->driver->platform_device->name); | ||
62 | } | ||
63 | } else { | 59 | } else { |
64 | if (master->unique) { | 60 | seq_printf(m, "%s %s\n", |
65 | seq_printf(m, "%s %s %s\n", | 61 | bus_name, dev_name(dev->dev)); |
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 | } | ||
72 | } | 62 | } |
73 | |||
74 | return 0; | 63 | return 0; |
75 | } | 64 | } |
76 | 65 | ||