diff options
Diffstat (limited to 'drivers/usb/storage/realtek_cr.c')
-rw-r--r-- | drivers/usb/storage/realtek_cr.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c index 31b024441938..cc794e25a0b6 100644 --- a/drivers/usb/storage/realtek_cr.c +++ b/drivers/usb/storage/realtek_cr.c | |||
@@ -763,18 +763,16 @@ static void rts51x_suspend_timer_fn(struct timer_list *t) | |||
763 | break; | 763 | break; |
764 | case RTS51X_STAT_IDLE: | 764 | case RTS51X_STAT_IDLE: |
765 | case RTS51X_STAT_SS: | 765 | case RTS51X_STAT_SS: |
766 | usb_stor_dbg(us, "RTS51X_STAT_SS, intf->pm_usage_cnt:%d, power.usage:%d\n", | 766 | usb_stor_dbg(us, "RTS51X_STAT_SS, power.usage:%d\n", |
767 | atomic_read(&us->pusb_intf->pm_usage_cnt), | ||
768 | atomic_read(&us->pusb_intf->dev.power.usage_count)); | 767 | atomic_read(&us->pusb_intf->dev.power.usage_count)); |
769 | 768 | ||
770 | if (atomic_read(&us->pusb_intf->pm_usage_cnt) > 0) { | 769 | if (atomic_read(&us->pusb_intf->dev.power.usage_count) > 0) { |
771 | usb_stor_dbg(us, "Ready to enter SS state\n"); | 770 | usb_stor_dbg(us, "Ready to enter SS state\n"); |
772 | rts51x_set_stat(chip, RTS51X_STAT_SS); | 771 | rts51x_set_stat(chip, RTS51X_STAT_SS); |
773 | /* ignore mass storage interface's children */ | 772 | /* ignore mass storage interface's children */ |
774 | pm_suspend_ignore_children(&us->pusb_intf->dev, true); | 773 | pm_suspend_ignore_children(&us->pusb_intf->dev, true); |
775 | usb_autopm_put_interface_async(us->pusb_intf); | 774 | usb_autopm_put_interface_async(us->pusb_intf); |
776 | usb_stor_dbg(us, "RTS51X_STAT_SS 01, intf->pm_usage_cnt:%d, power.usage:%d\n", | 775 | usb_stor_dbg(us, "RTS51X_STAT_SS 01, power.usage:%d\n", |
777 | atomic_read(&us->pusb_intf->pm_usage_cnt), | ||
778 | atomic_read(&us->pusb_intf->dev.power.usage_count)); | 776 | atomic_read(&us->pusb_intf->dev.power.usage_count)); |
779 | } | 777 | } |
780 | break; | 778 | break; |
@@ -807,11 +805,10 @@ static void rts51x_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
807 | int ret; | 805 | int ret; |
808 | 806 | ||
809 | if (working_scsi(srb)) { | 807 | if (working_scsi(srb)) { |
810 | usb_stor_dbg(us, "working scsi, intf->pm_usage_cnt:%d, power.usage:%d\n", | 808 | usb_stor_dbg(us, "working scsi, power.usage:%d\n", |
811 | atomic_read(&us->pusb_intf->pm_usage_cnt), | ||
812 | atomic_read(&us->pusb_intf->dev.power.usage_count)); | 809 | atomic_read(&us->pusb_intf->dev.power.usage_count)); |
813 | 810 | ||
814 | if (atomic_read(&us->pusb_intf->pm_usage_cnt) <= 0) { | 811 | if (atomic_read(&us->pusb_intf->dev.power.usage_count) <= 0) { |
815 | ret = usb_autopm_get_interface(us->pusb_intf); | 812 | ret = usb_autopm_get_interface(us->pusb_intf); |
816 | usb_stor_dbg(us, "working scsi, ret=%d\n", ret); | 813 | usb_stor_dbg(us, "working scsi, ret=%d\n", ret); |
817 | } | 814 | } |