* [RFC PATCH] mmc: core: remove the mmc_sd_card_uhs()
@ 2013-09-10 5:44 Jaehoon Chung
2013-09-10 6:01 ` Jaehoon Chung
0 siblings, 1 reply; 2+ messages in thread
From: Jaehoon Chung @ 2013-09-10 5:44 UTC (permalink / raw)
To: linux-mmc@vger.kernel.org
Cc: 'Chris Ball', Ulf Hansson, Seungwon Jeon,
'Konstantin Dorfman', Wei WANG
mmc_sd_card_uhs() didn't has difference with mmc_card_uhs().
And mmc_sd_card_set_uhs() didn't use anywhere.
I'm not sure why mmc_sd_card_uhs() used.
If need to check whether card is sd or not, then we can use the mmc_card_sd().
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/core/bus.c | 2 +-
drivers/mmc/host/rtsx_pci_sdmmc.c | 2 +-
include/linux/mmc/card.h | 2 --
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 704bf66..cdca8a7 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -340,7 +340,7 @@ int mmc_add_card(struct mmc_card *card)
break;
}
- if (mmc_sd_card_uhs(card) &&
+ if (mmc_card_uhs(card) &&
(card->sd_bus_speed < ARRAY_SIZE(uhs_speeds)))
uhs_bus_speed_mode = uhs_speeds[card->sd_bus_speed];
diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index 82a35b9..b6964a1 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -359,7 +359,7 @@ static int sd_rw_multi(struct realtek_pci_sdmmc *host, struct mmc_request *mrq)
struct mmc_host *mmc = host->mmc;
struct mmc_card *card = mmc->card;
struct mmc_data *data = mrq->data;
- int uhs = mmc_sd_card_uhs(card);
+ int uhs = mmc_card_uhs(card);
int read = (data->flags & MMC_DATA_READ) ? 1 : 0;
u8 cfg2, trans_mode;
int err;
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 842de3e..f42cdbd 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -420,7 +420,6 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
#define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR)
#define mmc_card_ddr_mode(c) ((c)->state & MMC_STATE_HIGHSPEED_DDR)
#define mmc_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED)
-#define mmc_sd_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED)
#define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC)
#define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED))
#define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS)
@@ -432,7 +431,6 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
#define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR)
#define mmc_card_set_ddr_mode(c) ((c)->state |= MMC_STATE_HIGHSPEED_DDR)
#define mmc_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED)
-#define mmc_sd_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED)
#define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC)
#define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED)
#define mmc_card_set_doing_bkops(c) ((c)->state |= MMC_STATE_DOING_BKOPS)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] mmc: core: remove the mmc_sd_card_uhs()
2013-09-10 5:44 [RFC PATCH] mmc: core: remove the mmc_sd_card_uhs() Jaehoon Chung
@ 2013-09-10 6:01 ` Jaehoon Chung
0 siblings, 0 replies; 2+ messages in thread
From: Jaehoon Chung @ 2013-09-10 6:01 UTC (permalink / raw)
To: Jaehoon Chung
Cc: linux-mmc@vger.kernel.org, 'Chris Ball', Ulf Hansson,
Seungwon Jeon, 'Konstantin Dorfman', Wei WANG,
jackey.shen
I found this patch has already posted at mailing.
http://permalink.gmane.org/gmane.linux.kernel.mmc/20474
On 09/10/2013 02:44 PM, Jaehoon Chung wrote:
> mmc_sd_card_uhs() didn't has difference with mmc_card_uhs().
> And mmc_sd_card_set_uhs() didn't use anywhere.
>
> I'm not sure why mmc_sd_card_uhs() used.
> If need to check whether card is sd or not, then we can use the mmc_card_sd().
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
> drivers/mmc/core/bus.c | 2 +-
> drivers/mmc/host/rtsx_pci_sdmmc.c | 2 +-
> include/linux/mmc/card.h | 2 --
> 3 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
> index 704bf66..cdca8a7 100644
> --- a/drivers/mmc/core/bus.c
> +++ b/drivers/mmc/core/bus.c
> @@ -340,7 +340,7 @@ int mmc_add_card(struct mmc_card *card)
> break;
> }
>
> - if (mmc_sd_card_uhs(card) &&
> + if (mmc_card_uhs(card) &&
> (card->sd_bus_speed < ARRAY_SIZE(uhs_speeds)))
> uhs_bus_speed_mode = uhs_speeds[card->sd_bus_speed];
>
> diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
> index 82a35b9..b6964a1 100644
> --- a/drivers/mmc/host/rtsx_pci_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
> @@ -359,7 +359,7 @@ static int sd_rw_multi(struct realtek_pci_sdmmc *host, struct mmc_request *mrq)
> struct mmc_host *mmc = host->mmc;
> struct mmc_card *card = mmc->card;
> struct mmc_data *data = mrq->data;
> - int uhs = mmc_sd_card_uhs(card);
> + int uhs = mmc_card_uhs(card);
> int read = (data->flags & MMC_DATA_READ) ? 1 : 0;
> u8 cfg2, trans_mode;
> int err;
> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
> index 842de3e..f42cdbd 100644
> --- a/include/linux/mmc/card.h
> +++ b/include/linux/mmc/card.h
> @@ -420,7 +420,6 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
> #define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR)
> #define mmc_card_ddr_mode(c) ((c)->state & MMC_STATE_HIGHSPEED_DDR)
> #define mmc_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED)
> -#define mmc_sd_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED)
> #define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC)
> #define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED))
> #define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS)
> @@ -432,7 +431,6 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
> #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR)
> #define mmc_card_set_ddr_mode(c) ((c)->state |= MMC_STATE_HIGHSPEED_DDR)
> #define mmc_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED)
> -#define mmc_sd_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED)
> #define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC)
> #define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED)
> #define mmc_card_set_doing_bkops(c) ((c)->state |= MMC_STATE_DOING_BKOPS)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-10 6:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10 5:44 [RFC PATCH] mmc: core: remove the mmc_sd_card_uhs() Jaehoon Chung
2013-09-10 6:01 ` Jaehoon Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).