From fdad8bbc339dbc070c0ec43e4a02f638072c4017 Mon Sep 17 00:00:00 2001 From: lyz Date: Tue, 9 Sep 2014 09:32:14 +0800 Subject: [PATCH] usb: dwc_otg: prevent sleeping function called from atomic context Disable _local_ irq make no sense here and we don't really need it, if we need to disable usb irqs from dwc_otg call func dwc_otg_disable_global_interrupts() can be more useful. --- drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c b/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c index c16e5671f870..da339bfba076 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c @@ -1508,9 +1508,6 @@ static void dwc_otg_pcd_check_vbus_work(struct work_struct *work) container_of(work, dwc_otg_pcd_t, check_vbus_work.work); struct dwc_otg_device *otg_dev = _pcd->otg_dev; struct dwc_otg_platform_data *pldata = otg_dev->pldata; - unsigned long flags; - - local_irq_save(flags); if (!pldata->get_status(USB_STATUS_ID)) { /* id low, host mode */ @@ -1597,8 +1594,6 @@ static void dwc_otg_pcd_check_vbus_work(struct work_struct *work) } schedule_delayed_work(&_pcd->check_vbus_work, HZ); - local_irq_restore(flags); - return; connect: @@ -1612,7 +1607,6 @@ connect: schedule_delayed_work(&_pcd->reconnect, 8); /* delay 8 jiffies */ schedule_delayed_work(&_pcd->check_vbus_work, (HZ << 2)); - local_irq_restore(flags); return; } -- 2.34.1