diff options
Diffstat (limited to 'drivers/usb/gadget/file_storage.c')
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 4857f0e4ef4..a9be85103d2 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -1554,8 +1554,7 @@ static int sleep_thread(struct fsg_dev *fsg) rc = wait_event_interruptible(fsg->thread_wqh, fsg->thread_wakeup_needed); fsg->thread_wakeup_needed = 0; - if (current->flags & PF_FREEZE) - refrigerator(PF_FREEZE); + try_to_freeze(); return (rc ? -EINTR : 0); } @@ -3554,14 +3553,14 @@ static void close_all_backing_files(struct fsg_dev *fsg) } -static ssize_t show_ro(struct device *dev, char *buf) +static ssize_t show_ro(struct device *dev, struct device_attribute *attr, char *buf) { struct lun *curlun = dev_to_lun(dev); return sprintf(buf, "%d\n", curlun->ro); } -static ssize_t show_file(struct device *dev, char *buf) +static ssize_t show_file(struct device *dev, struct device_attribute *attr, char *buf) { struct lun *curlun = dev_to_lun(dev); struct fsg_dev *fsg = (struct fsg_dev *) dev_get_drvdata(dev); @@ -3589,7 +3588,7 @@ static ssize_t show_file(struct device *dev, char *buf) } -static ssize_t store_ro(struct device *dev, const char *buf, size_t count) +static ssize_t store_ro(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { ssize_t rc = count; struct lun *curlun = dev_to_lun(dev); @@ -3613,7 +3612,7 @@ static ssize_t store_ro(struct device *dev, const char *buf, size_t count) return rc; } -static ssize_t store_file(struct device *dev, const char *buf, size_t count) +static ssize_t store_file(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct lun *curlun = dev_to_lun(dev); struct fsg_dev *fsg = (struct fsg_dev *) dev_get_drvdata(dev); |