Usb drivers can register themselves and call drm_get_usb_dev
in their probe function. We don't need a drm specific wrapper
function for this. As there are currently no users, none a
touched here.

Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>
---
 drivers/gpu/drm/drm_usb.c |   26 ++++----------------------
 include/drm/drm_usb.h     |    3 ---
 2 files changed, 4 insertions(+), 25 deletions(-)

diff --git a/drivers/gpu/drm/drm_usb.c b/drivers/gpu/drm/drm_usb.c
index b7eb64a..dd154d4 100644
--- a/drivers/gpu/drm/drm_usb.c
+++ b/drivers/gpu/drm/drm_usb.c
@@ -2,6 +2,8 @@
 #include <linux/usb.h>
 #include <linux/export.h>
 
+static struct drm_bus drm_usb_bus;
+
 #ifdef CONFIG_USB
 int drm_get_usb_dev(struct usb_interface *interface,
                    const struct usb_device_id *id,
@@ -17,6 +19,8 @@ int drm_get_usb_dev(struct usb_interface *interface,
        if (!dev)
                return -ENOMEM;
 
+       driver->bus = &drm_usb_bus;
+
        usbdev = interface_to_usbdev(interface);
        dev->dev = &usbdev->dev;
 
@@ -49,8 +53,6 @@ int drm_get_usb_dev(struct usb_interface *interface,
        if (ret)
                goto err_g3;
 
-       list_add_tail(&dev->driver_item, &driver->device_list);
-
        mutex_unlock(&drm_global_mutex);
 
        DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n",
@@ -92,24 +94,4 @@ static struct drm_bus drm_usb_bus = {
        .get_name = drm_usb_get_name,
        .set_busid = drm_usb_set_busid,
 };
-    
-int drm_usb_init(struct drm_driver *driver, struct usb_driver *udriver)
-{
-       int res;
-       DRM_DEBUG("\n");
-
-       INIT_LIST_HEAD(&driver->device_list);
-       driver->bus = &drm_usb_bus;
-
-       res = usb_register(udriver);
-       return res;
-}
-EXPORT_SYMBOL(drm_usb_init);
-
-void drm_usb_exit(struct drm_driver *driver,
-                 struct usb_driver *udriver)
-{
-       usb_deregister(udriver);
-}
-EXPORT_SYMBOL(drm_usb_exit);
 #endif
diff --git a/include/drm/drm_usb.h b/include/drm/drm_usb.h
index 33506c11..198f90b 100644
--- a/include/drm/drm_usb.h
+++ b/include/drm/drm_usb.h
@@ -5,9 +5,6 @@
 
 #include <linux/usb.h>
 
-extern int drm_usb_init(struct drm_driver *driver, struct usb_driver *udriver);
-extern void drm_usb_exit(struct drm_driver *driver, struct usb_driver 
*udriver);
-
 int drm_get_usb_dev(struct usb_interface *interface,
                    const struct usb_device_id *id,
                    struct drm_driver *driver);
-- 
1.7.8.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to