Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354625
b: refs/heads/master
c: 2b50800
h: refs/heads/master
i:
  354623: ef70e29
v: v3
  • Loading branch information
Andrzej Pietrasiewicz authored and Felipe Balbi committed Jan 10, 2013
1 parent bc4e592 commit 1e33f0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d640ad394d71a2467d0e08a3337fdad828786bb
refs/heads/master: 2b5080026cc4c29e68642fea2b7e2cc77b2796f3
29 changes: 1 addition & 28 deletions trunk/drivers/usb/gadget/f_mass_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,6 @@ struct fsg_operations {
* set).
*/
int (*thread_exits)(struct fsg_common *common);

/*
* Called prior to ejection. Negative return means error,
* zero means to continue with ejection, positive means not to
* eject.
*/
int (*pre_eject)(struct fsg_common *common,
struct fsg_lun *lun, int num);
/*
* Called after ejection. Negative return means error, zero
* or positive is just a success.
*/
int (*post_eject)(struct fsg_common *common,
struct fsg_lun *lun, int num);
};

/* Data shared by all the FSG instances. */
Expand Down Expand Up @@ -1374,26 +1360,13 @@ static int do_start_stop(struct fsg_common *common)
if (!loej)
return 0;

/* Simulate an unload/eject */
if (common->ops && common->ops->pre_eject) {
int r = common->ops->pre_eject(common, curlun,
curlun - common->luns);
if (unlikely(r < 0))
return r;
else if (r)
return 0;
}

up_read(&common->filesem);
down_write(&common->filesem);
fsg_lun_close(curlun);
up_write(&common->filesem);
down_read(&common->filesem);

return common->ops && common->ops->post_eject
? min(0, common->ops->post_eject(common, curlun,
curlun - common->luns))
: 0;
return 0;
}

static int do_prevent_allow(struct fsg_common *common)
Expand Down

0 comments on commit 1e33f0c

Please sign in to comment.