aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-08-29 06:12:44 -0400
committerDave Airlie <airlied@redhat.com>2014-09-10 03:43:10 -0400
commitc5786fe5f1c50941dbe27fc8b4aa1afee46ae893 (patch)
treea2a8786bdb77a90b319c4e0ced2bf8cceff52f01
parent915b4d11b8b9e7b84ba4a4645b6cc7fbc0c071cf (diff)
drm: Goody bye, drm_bus!
..we will not miss you.. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_ioctl.c8
-rw-r--r--drivers/gpu/drm/drm_pci.c6
-rw-r--r--drivers/gpu/drm/drm_platform.c5
-rw-r--r--drivers/gpu/drm/drm_usb.c12
-rw-r--r--include/drm/drmP.h5
5 files changed, 1 insertions, 35 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 4770bd78b307..3a1349f82b41 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -250,15 +250,9 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv)
250 drm_unset_busid(dev, master); 250 drm_unset_busid(dev, master);
251 return ret; 251 return ret;
252 } 252 }
253 } else if (dev->driver->bus && dev->driver->bus->set_busid) {
254 ret = dev->driver->bus->set_busid(dev, master);
255 if (ret) {
256 drm_unset_busid(dev, master);
257 return ret;
258 }
259 } else { 253 } else {
260 if (WARN(dev->unique == NULL, 254 if (WARN(dev->unique == NULL,
261 "No drm_bus.set_busid() implementation provided by " 255 "No drm_driver.set_busid() implementation provided by "
262 "%ps. Use drm_dev_set_unique() to set the unique " 256 "%ps. Use drm_dev_set_unique() to set the unique "
263 "name explicitly.", dev->driver)) 257 "name explicitly.", dev->driver))
264 return -EINVAL; 258 return -EINVAL;
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 0400c371cbde..7563130c6b70 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -254,10 +254,6 @@ void drm_pci_agp_destroy(struct drm_device *dev)
254 } 254 }
255} 255}
256 256
257static struct drm_bus drm_pci_bus = {
258 .set_busid = drm_pci_set_busid,
259};
260
261/** 257/**
262 * drm_get_pci_dev - Register a PCI device with the DRM subsystem 258 * drm_get_pci_dev - Register a PCI device with the DRM subsystem
263 * @pdev: PCI device 259 * @pdev: PCI device
@@ -338,8 +334,6 @@ int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver)
338 334
339 DRM_DEBUG("\n"); 335 DRM_DEBUG("\n");
340 336
341 driver->bus = &drm_pci_bus;
342
343 if (driver->driver_features & DRIVER_MODESET) 337 if (driver->driver_features & DRIVER_MODESET)
344 return pci_register_driver(pdriver); 338 return pci_register_driver(pdriver);
345 339
diff --git a/drivers/gpu/drm/drm_platform.c b/drivers/gpu/drm/drm_platform.c
index 939cd2272b91..5314c9d5fef4 100644
--- a/drivers/gpu/drm/drm_platform.c
+++ b/drivers/gpu/drm/drm_platform.c
@@ -86,10 +86,6 @@ int drm_platform_set_busid(struct drm_device *dev, struct drm_master *master)
86} 86}
87EXPORT_SYMBOL(drm_platform_set_busid); 87EXPORT_SYMBOL(drm_platform_set_busid);
88 88
89static struct drm_bus drm_platform_bus = {
90 .set_busid = drm_platform_set_busid,
91};
92
93/** 89/**
94 * drm_platform_init - Register a platform device with the DRM subsystem 90 * drm_platform_init - Register a platform device with the DRM subsystem
95 * @driver: DRM device driver 91 * @driver: DRM device driver
@@ -105,7 +101,6 @@ int drm_platform_init(struct drm_driver *driver, struct platform_device *platfor
105{ 101{
106 DRM_DEBUG("\n"); 102 DRM_DEBUG("\n");
107 103
108 driver->bus = &drm_platform_bus;
109 return drm_get_platform_dev(platform_device, driver); 104 return drm_get_platform_dev(platform_device, driver);
110} 105}
111EXPORT_SYMBOL(drm_platform_init); 106EXPORT_SYMBOL(drm_platform_init);
diff --git a/drivers/gpu/drm/drm_usb.c b/drivers/gpu/drm/drm_usb.c
index f2fe94aab901..9c434905d37f 100644
--- a/drivers/gpu/drm/drm_usb.c
+++ b/drivers/gpu/drm/drm_usb.c
@@ -36,16 +36,6 @@ err_free:
36} 36}
37EXPORT_SYMBOL(drm_get_usb_dev); 37EXPORT_SYMBOL(drm_get_usb_dev);
38 38
39static int drm_usb_set_busid(struct drm_device *dev,
40 struct drm_master *master)
41{
42 return 0;
43}
44
45static struct drm_bus drm_usb_bus = {
46 .set_busid = drm_usb_set_busid,
47};
48
49/** 39/**
50 * drm_usb_init - Register matching USB devices with the DRM subsystem 40 * drm_usb_init - Register matching USB devices with the DRM subsystem
51 * @driver: DRM device driver 41 * @driver: DRM device driver
@@ -61,8 +51,6 @@ int drm_usb_init(struct drm_driver *driver, struct usb_driver *udriver)
61 int res; 51 int res;
62 DRM_DEBUG("\n"); 52 DRM_DEBUG("\n");
63 53
64 driver->bus = &drm_usb_bus;
65
66 res = usb_register(udriver); 54 res = usb_register(udriver);
67 return res; 55 return res;
68} 56}
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index c82f292efcd4..5ae388a9bb98 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -605,10 +605,6 @@ struct drm_master {
605#define DRM_SCANOUTPOS_INVBL (1 << 1) 605#define DRM_SCANOUTPOS_INVBL (1 << 1)
606#define DRM_SCANOUTPOS_ACCURATE (1 << 2) 606#define DRM_SCANOUTPOS_ACCURATE (1 << 2)
607 607
608struct drm_bus {
609 int (*set_busid)(struct drm_device *dev, struct drm_master *master);
610};
611
612/** 608/**
613 * DRM driver structure. This structure represent the common code for 609 * DRM driver structure. This structure represent the common code for
614 * a family of cards. There will one drm_device for each card present 610 * a family of cards. There will one drm_device for each card present
@@ -846,7 +842,6 @@ struct drm_driver {
846 const struct drm_ioctl_desc *ioctls; 842 const struct drm_ioctl_desc *ioctls;
847 int num_ioctls; 843 int num_ioctls;
848 const struct file_operations *fops; 844 const struct file_operations *fops;
849 struct drm_bus *bus;
850 845
851 /* List of devices hanging off this driver with stealth attach. */ 846 /* List of devices hanging off this driver with stealth attach. */
852 struct list_head legacy_dev_list; 847 struct list_head legacy_dev_list;