aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/storage_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/storage_common.c')
-rw-r--r--drivers/usb/gadget/storage_common.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index dbce3a9074e6..08a1a3210a21 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -172,7 +172,7 @@ MODULE_PARM_DESC(num_buffers, "Number of pipeline buffers");
172 */ 172 */
173#define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS 173#define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS
174 174
175#endif /* CONFIG_USB_DEBUG */ 175#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
176 176
177/* check if fsg_num_buffers is within a valid range */ 177/* check if fsg_num_buffers is within a valid range */
178static inline int fsg_num_buffers_validate(void) 178static inline int fsg_num_buffers_validate(void)
@@ -547,8 +547,8 @@ static void store_cdrom_address(u8 *dest, int msf, u32 addr)
547/*-------------------------------------------------------------------------*/ 547/*-------------------------------------------------------------------------*/
548 548
549 549
550static ssize_t fsg_show_ro(struct device *dev, struct device_attribute *attr, 550static ssize_t ro_show(struct device *dev, struct device_attribute *attr,
551 char *buf) 551 char *buf)
552{ 552{
553 struct fsg_lun *curlun = fsg_lun_from_dev(dev); 553 struct fsg_lun *curlun = fsg_lun_from_dev(dev);
554 554
@@ -557,16 +557,16 @@ static ssize_t fsg_show_ro(struct device *dev, struct device_attribute *attr,
557 : curlun->initially_ro); 557 : curlun->initially_ro);
558} 558}
559 559
560static ssize_t fsg_show_nofua(struct device *dev, struct device_attribute *attr, 560static ssize_t nofua_show(struct device *dev, struct device_attribute *attr,
561 char *buf) 561 char *buf)
562{ 562{
563 struct fsg_lun *curlun = fsg_lun_from_dev(dev); 563 struct fsg_lun *curlun = fsg_lun_from_dev(dev);
564 564
565 return sprintf(buf, "%u\n", curlun->nofua); 565 return sprintf(buf, "%u\n", curlun->nofua);
566} 566}
567 567
568static ssize_t fsg_show_file(struct device *dev, struct device_attribute *attr, 568static ssize_t file_show(struct device *dev, struct device_attribute *attr,
569 char *buf) 569 char *buf)
570{ 570{
571 struct fsg_lun *curlun = fsg_lun_from_dev(dev); 571 struct fsg_lun *curlun = fsg_lun_from_dev(dev);
572 struct rw_semaphore *filesem = dev_get_drvdata(dev); 572 struct rw_semaphore *filesem = dev_get_drvdata(dev);
@@ -593,8 +593,8 @@ static ssize_t fsg_show_file(struct device *dev, struct device_attribute *attr,
593} 593}
594 594
595 595
596static ssize_t fsg_store_ro(struct device *dev, struct device_attribute *attr, 596static ssize_t ro_store(struct device *dev, struct device_attribute *attr,
597 const char *buf, size_t count) 597 const char *buf, size_t count)
598{ 598{
599 ssize_t rc; 599 ssize_t rc;
600 struct fsg_lun *curlun = fsg_lun_from_dev(dev); 600 struct fsg_lun *curlun = fsg_lun_from_dev(dev);
@@ -623,9 +623,8 @@ static ssize_t fsg_store_ro(struct device *dev, struct device_attribute *attr,
623 return rc; 623 return rc;
624} 624}
625 625
626static ssize_t fsg_store_nofua(struct device *dev, 626static ssize_t nofua_store(struct device *dev, struct device_attribute *attr,
627 struct device_attribute *attr, 627 const char *buf, size_t count)
628 const char *buf, size_t count)
629{ 628{
630 struct fsg_lun *curlun = fsg_lun_from_dev(dev); 629 struct fsg_lun *curlun = fsg_lun_from_dev(dev);
631 unsigned nofua; 630 unsigned nofua;
@@ -644,8 +643,8 @@ static ssize_t fsg_store_nofua(struct device *dev,
644 return count; 643 return count;
645} 644}
646 645
647static ssize_t fsg_store_file(struct device *dev, struct device_attribute *attr, 646static ssize_t file_store(struct device *dev, struct device_attribute *attr,
648 const char *buf, size_t count) 647 const char *buf, size_t count)
649{ 648{
650 struct fsg_lun *curlun = fsg_lun_from_dev(dev); 649 struct fsg_lun *curlun = fsg_lun_from_dev(dev);
651 struct rw_semaphore *filesem = dev_get_drvdata(dev); 650 struct rw_semaphore *filesem = dev_get_drvdata(dev);