diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-06-07 19:50:05 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2014-06-07 20:35:01 +0200 |
commit | 4a3d1cfa8e161227d80765750d6906620eca1338 (patch) | |
tree | 3dde3694af4e2203c4f5112fa58ead6777e642b0 | |
parent | 484d772d96bf4bf1a8f7a332135d6152814db2ff (diff) |
backports: add mmc_card_hs()
This is needed by the RSI driver.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | backport/backport-include/linux/mmc/host.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/backport/backport-include/linux/mmc/host.h b/backport/backport-include/linux/mmc/host.h new file mode 100644 index 00000000..49d7049b --- /dev/null +++ b/backport/backport-include/linux/mmc/host.h @@ -0,0 +1,16 @@ +#ifndef _BACKPORTLINUX_MMC_HOST_H +#define _BACKPORTLINUX_MMC_HOST_H +#include_next <linux/mmc/host.h> +#include <linux/version.h> +#include <linux/mmc/card.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0) +#define mmc_card_hs LINUX_BACKPORT(mmc_card_hs) +static inline int mmc_card_hs(struct mmc_card *card) +{ + return card->host->ios.timing == MMC_TIMING_SD_HS || + card->host->ios.timing == MMC_TIMING_MMC_HS; +} +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0) */ + +#endif /* _BACKPORTLINUX_MMC_HOST_H */ |