diff options
author | Nicolas Pitre <nico@cam.org> | 2007-06-30 16:21:52 +0200 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-23 20:55:13 +0200 |
commit | 2342f3323c9a76367a1d7f9a35525ee3cb3911df (patch) | |
tree | 1fdb42702137dfbe0be0c2e1c6777a0c0ddb1bcf /include/linux/mmc | |
parent | 55fe77a0a24e05c9aaf1a13550dde5efad8b49f2 (diff) | |
download | linux-3.10-2342f3323c9a76367a1d7f9a35525ee3cb3911df.tar.gz linux-3.10-2342f3323c9a76367a1d7f9a35525ee3cb3911df.tar.bz2 linux-3.10-2342f3323c9a76367a1d7f9a35525ee3cb3911df.zip |
sdio: allow for mmc_claim_host to be aborted
It is sometimes necessary to give up on trying to claim the host lock,
especially if that happens in a thread that has to be stopped.
While at it, fix the description for mmc_claim_host() which was wrong.
Signed-off-by: Nicolas Pitre <npitre@mvista.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r-- | include/linux/mmc/core.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 43a92736be6..8945da9b54f 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -114,7 +114,18 @@ extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); -extern void mmc_claim_host(struct mmc_host *host); +extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); extern void mmc_release_host(struct mmc_host *host); +/** + * mmc_claim_host - exclusively claim a host + * @host: mmc host to claim + * + * Claim a host for a set of operations. + */ +static inline void mmc_claim_host(struct mmc_host *host) +{ + __mmc_claim_host(host, NULL); +} + #endif |