Skip to content

Commit

Permalink
Allow building with CONFIG_USB_GADGET=N
Browse files Browse the repository at this point in the history
Errors are the same as in issue torvalds#83
  • Loading branch information
apxii committed Oct 13, 2012
1 parent fc4c453 commit ef35138
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/usb/sun4i_usb/manager/usb_msg_center.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,12 @@ static void rmmod_host_driver(struct usb_msg_center_info *center_info)

static void insmod_device_driver(struct usb_msg_center_info *center_info)
{
#ifdef CONFIG_USB_SW_SUN4I_UDC0
DMSG_INFO("\n\ninsmod_device_driver\n\n");

set_usb_role(center_info, USB_ROLE_DEVICE);
sw_usb_device_enable();

#endif
return;
}

Expand All @@ -262,11 +263,12 @@ static void insmod_device_driver(struct usb_msg_center_info *center_info)
*/
static void rmmod_device_driver(struct usb_msg_center_info *center_info)
{
#ifdef CONFIG_USB_SW_SUN4I_UDC0
DMSG_INFO("\n\nrmmod_device_driver\n\n");

set_usb_role(center_info, USB_ROLE_NULL);
sw_usb_device_disable();

#endif
return;
}

Expand Down

0 comments on commit ef35138

Please sign in to comment.