diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2013-10-15 08:33:13 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-10-15 06:52:08 -0500 |
commit | b8798636798ee04feb0f1bb87eec0027e3f68d98 (patch) | |
tree | e1fd22c9a2743d1d383d9ffc7dfcb7871b94c722 /drivers/usb/gadget/storage_common.h | |
parent | 81a1d5ea6670acecf1366cd6a4d328c123bdf9fa (diff) | |
download | op-kernel-dev-b8798636798ee04feb0f1bb87eec0027e3f68d98.zip op-kernel-dev-b8798636798ee04feb0f1bb87eec0027e3f68d98.tar.gz |
usb: gadget: storage_common: pass filesem to fsg_store_cdrom
If cdrom flag is set ro flag is implied. Try setting the ro first, and
only if it succeeds set the cdrom flag.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/storage_common.h')
-rw-r--r-- | drivers/usb/gadget/storage_common.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/storage_common.h b/drivers/usb/gadget/storage_common.h index e0f7aa6..c74c2fd 100644 --- a/drivers/usb/gadget/storage_common.h +++ b/drivers/usb/gadget/storage_common.h @@ -221,7 +221,8 @@ ssize_t fsg_store_ro(struct fsg_lun *curlun, struct rw_semaphore *filesem, ssize_t fsg_store_nofua(struct fsg_lun *curlun, const char *buf, size_t count); ssize_t fsg_store_file(struct fsg_lun *curlun, struct rw_semaphore *filesem, const char *buf, size_t count); -ssize_t fsg_store_cdrom(struct fsg_lun *curlun, const char *buf, size_t count); +ssize_t fsg_store_cdrom(struct fsg_lun *curlun, struct rw_semaphore *filesem, + const char *buf, size_t count); ssize_t fsg_store_removable(struct fsg_lun *curlun, const char *buf, size_t count); |