diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-09-28 12:09:08 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-09-28 12:09:08 +1000 |
commit | fee3c1d0e3f769001a0209050b12c117ab603a5b (patch) | |
tree | d9cb1543eaabf09af0501b0895f7f76c9bebb384 /include | |
parent | 48ad3ad53f1df1b4446476a67de253b6542f4c14 (diff) | |
parent | 8e75c0e3051de3af0a439e65ca773068d2706962 (diff) |
Merge remote branch 'mmc/mmc-next'
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmc/card.h | 2 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 6b7525099e56..7bd49234cd88 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -173,6 +173,8 @@ static inline int mmc_blksz_for_byte_mode(const struct mmc_card *c) #define mmc_card_name(c) ((c)->cid.prod_name) #define mmc_card_id(c) (dev_name(&(c)->dev)) +#define mmc_dev_to_card(d) container_of(d, struct mmc_card, dev) + #define mmc_list_to_card(l) container_of(l, struct mmc_card, node) #define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev) #define mmc_set_drvdata(c,d) dev_set_drvdata(&(c)->dev, d) diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 1575b52c3bfa..2e0fe623df90 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -162,8 +162,7 @@ struct mmc_host { /* host specific block data */ unsigned int max_seg_size; /* see blk_queue_max_segment_size */ - unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ - unsigned short max_phys_segs; /* see blk_queue_max_phys_segments */ + unsigned short max_segs; /* see blk_queue_max_segments */ unsigned short unused; unsigned int max_req_size; /* maximum number of bytes in one req */ unsigned int max_blk_size; /* maximum size of one mmc block */ @@ -268,5 +267,13 @@ static inline void mmc_set_disable_delay(struct mmc_host *host, host->disable_delay = disable_delay; } +/* Module parameter */ +extern int mmc_assume_removable; + +static inline int mmc_card_is_removable(struct mmc_host *host) +{ + return !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable; +} + #endif |