diff options
author | Jisheng Zhang <Jisheng.Zhang@synaptics.com> | 2021-03-24 10:50:13 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2021-03-30 12:42:07 +0300 |
commit | bac53336ca816624581a3de5f2c0991343ae5341 (patch) | |
tree | 364714bd0008d8b2f8f5c33aa6af10dafd851e8f /drivers/mmc/host/sdhci-tegra.c | |
parent | 57ac3084f598d238ae829d595bfc20afaf0feb38 (diff) | |
download | linux-bac53336ca816624581a3de5f2c0991343ae5341.tar.xz |
mmc: sdhci: replace mmc->parent with mmc_dev() for consistency
As pointed out by Ulf, "both "mmc->parent" and mmc_dev(mmc) are being
used in the entire c-file". Convert all the mmc->parent usage in all
sdhci host driver to mmc_dev() for consistency.
Suggested-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20210324155013.1e5faa3c@xhacker.debian
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-tegra.c')
-rw-r--r-- | drivers/mmc/host/sdhci-tegra.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 41d193fa77bb..c61f797a853f 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -596,49 +596,49 @@ static void tegra_sdhci_parse_pad_autocal_dt(struct sdhci_host *host) &tegra_host->autocal_offsets; int err; - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-up-offset-3v3", &autocal->pull_up_3v3); if (err) autocal->pull_up_3v3 = 0; - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-down-offset-3v3", &autocal->pull_down_3v3); if (err) autocal->pull_down_3v3 = 0; - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-up-offset-1v8", &autocal->pull_up_1v8); if (err) autocal->pull_up_1v8 = 0; - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-down-offset-1v8", &autocal->pull_down_1v8); if (err) autocal->pull_down_1v8 = 0; - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-up-offset-sdr104", &autocal->pull_up_sdr104); if (err) autocal->pull_up_sdr104 = autocal->pull_up_1v8; - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-down-offset-sdr104", &autocal->pull_down_sdr104); if (err) autocal->pull_down_sdr104 = autocal->pull_down_1v8; - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-up-offset-hs400", &autocal->pull_up_hs400); if (err) autocal->pull_up_hs400 = autocal->pull_up_1v8; - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-down-offset-hs400", &autocal->pull_down_hs400); if (err) @@ -653,7 +653,7 @@ static void tegra_sdhci_parse_pad_autocal_dt(struct sdhci_host *host) if (!(tegra_host->soc_data->nvquirks & NVQUIRK_NEEDS_PAD_CONTROL)) return; - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-up-offset-3v3-timeout", &autocal->pull_up_3v3_timeout); if (err) { @@ -664,7 +664,7 @@ static void tegra_sdhci_parse_pad_autocal_dt(struct sdhci_host *host) autocal->pull_up_3v3_timeout = 0; } - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-down-offset-3v3-timeout", &autocal->pull_down_3v3_timeout); if (err) { @@ -675,7 +675,7 @@ static void tegra_sdhci_parse_pad_autocal_dt(struct sdhci_host *host) autocal->pull_down_3v3_timeout = 0; } - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-up-offset-1v8-timeout", &autocal->pull_up_1v8_timeout); if (err) { @@ -686,7 +686,7 @@ static void tegra_sdhci_parse_pad_autocal_dt(struct sdhci_host *host) autocal->pull_up_1v8_timeout = 0; } - err = device_property_read_u32(host->mmc->parent, + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,pad-autocal-pull-down-offset-1v8-timeout", &autocal->pull_down_1v8_timeout); if (err) { @@ -720,17 +720,17 @@ static void tegra_sdhci_parse_tap_and_trim(struct sdhci_host *host) struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(pltfm_host); int err; - err = device_property_read_u32(host->mmc->parent, "nvidia,default-tap", + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,default-tap", &tegra_host->default_tap); if (err) tegra_host->default_tap = 0; - err = device_property_read_u32(host->mmc->parent, "nvidia,default-trim", + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,default-trim", &tegra_host->default_trim); if (err) tegra_host->default_trim = 0; - err = device_property_read_u32(host->mmc->parent, "nvidia,dqs-trim", + err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,dqs-trim", &tegra_host->dqs_trim); if (err) tegra_host->dqs_trim = 0x11; @@ -741,7 +741,7 @@ static void tegra_sdhci_parse_dt(struct sdhci_host *host) struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(pltfm_host); - if (device_property_read_bool(host->mmc->parent, "supports-cqe")) + if (device_property_read_bool(mmc_dev(host->mmc), "supports-cqe")) tegra_host->enable_hwcq = true; else tegra_host->enable_hwcq = false; @@ -1529,7 +1529,7 @@ static int sdhci_tegra_add_host(struct sdhci_host *host) host->mmc->caps2 |= MMC_CAP2_CQE | MMC_CAP2_CQE_DCMD; - cq_host = devm_kzalloc(host->mmc->parent, + cq_host = devm_kzalloc(mmc_dev(host->mmc), sizeof(*cq_host), GFP_KERNEL); if (!cq_host) { ret = -ENOMEM; |