diff options
Diffstat (limited to 'drivers/usb/host/sl811-hcd.c')
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index fa34092bbcde..3a586aab3939 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -597,7 +597,7 @@ done(struct sl811 *sl811, struct sl811h_ep *ep, u8 bank, struct pt_regs *regs) | |||
597 | /* error? retry, until "3 strikes" */ | 597 | /* error? retry, until "3 strikes" */ |
598 | } else if (++ep->error_count >= 3) { | 598 | } else if (++ep->error_count >= 3) { |
599 | if (status & SL11H_STATMASK_TMOUT) | 599 | if (status & SL11H_STATMASK_TMOUT) |
600 | urbstat = -ETIMEDOUT; | 600 | urbstat = -ETIME; |
601 | else if (status & SL11H_STATMASK_OVF) | 601 | else if (status & SL11H_STATMASK_OVF) |
602 | urbstat = -EOVERFLOW; | 602 | urbstat = -EOVERFLOW; |
603 | else | 603 | else |
@@ -1517,7 +1517,7 @@ static int proc_sl811h_open(struct inode *inode, struct file *file) | |||
1517 | return single_open(file, proc_sl811h_show, PDE(inode)->data); | 1517 | return single_open(file, proc_sl811h_show, PDE(inode)->data); |
1518 | } | 1518 | } |
1519 | 1519 | ||
1520 | static struct file_operations proc_ops = { | 1520 | static const struct file_operations proc_ops = { |
1521 | .open = proc_sl811h_open, | 1521 | .open = proc_sl811h_open, |
1522 | .read = seq_read, | 1522 | .read = seq_read, |
1523 | .llseek = seq_lseek, | 1523 | .llseek = seq_lseek, |
@@ -1783,10 +1783,15 @@ sl811h_suspend(struct platform_device *dev, pm_message_t state) | |||
1783 | struct sl811 *sl811 = hcd_to_sl811(hcd); | 1783 | struct sl811 *sl811 = hcd_to_sl811(hcd); |
1784 | int retval = 0; | 1784 | int retval = 0; |
1785 | 1785 | ||
1786 | if (state.event == PM_EVENT_FREEZE) | 1786 | switch (state.event) { |
1787 | case PM_EVENT_FREEZE: | ||
1787 | retval = sl811h_bus_suspend(hcd); | 1788 | retval = sl811h_bus_suspend(hcd); |
1788 | else if (state.event == PM_EVENT_SUSPEND) | 1789 | break; |
1790 | case PM_EVENT_SUSPEND: | ||
1791 | case PM_EVENT_PRETHAW: /* explicitly discard hw state */ | ||
1789 | port_power(sl811, 0); | 1792 | port_power(sl811, 0); |
1793 | break; | ||
1794 | } | ||
1790 | if (retval == 0) | 1795 | if (retval == 0) |
1791 | dev->dev.power.power_state = state; | 1796 | dev->dev.power.power_state = state; |
1792 | return retval; | 1797 | return retval; |