Lines Matching refs:usb_class
60 static struct usb_class { struct
63 } *usb_class; argument
79 if (usb_class != NULL) { in init_usb_class()
80 kref_get(&usb_class->kref); in init_usb_class()
84 usb_class = kmalloc(sizeof(*usb_class), GFP_KERNEL); in init_usb_class()
85 if (!usb_class) { in init_usb_class()
90 kref_init(&usb_class->kref); in init_usb_class()
91 usb_class->class = class_create(THIS_MODULE, "usbmisc"); in init_usb_class()
92 if (IS_ERR(usb_class->class)) { in init_usb_class()
93 result = PTR_ERR(usb_class->class); in init_usb_class()
95 kfree(usb_class); in init_usb_class()
96 usb_class = NULL; in init_usb_class()
99 usb_class->class->devnode = usb_devnode; in init_usb_class()
108 class_destroy(usb_class->class); in release_usb_class()
109 kfree(usb_class); in release_usb_class()
110 usb_class = NULL; in release_usb_class()
116 kref_put(&usb_class->kref, release_usb_class); in destroy_usb_class()
203 intf->usb_dev = device_create(usb_class->class, &intf->dev, in usb_register_dev()
237 device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor)); in usb_deregister_dev()