mmc: sdhci-pci: Remove unused member cd_con_id
PATCH 1/2 mmc: sdhci-pci: Remove unused member cd_con_id
cd_con_id is not used and always NULL.
Remove it to make code a bit more cleaner.
--- drivers/mmc/host/sdhci-pci-core.c | 3 +-- drivers/mmc/host/sdhci-pci.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/mmc/host/sdhci-pci-core.c +1 -2
@@ -424,7 +424,6 @@ static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot)static int byt_sd_probe_slot (struct sdhci_pci_slot *slot) { slot->host->mmc->caps |=MMC_CAP_WAIT_WHILE_BUSY ; - slot->cd_con_id =NULL ; slot->cd_idx =0 ; slot->cd_override_level = true; if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BXT_SD ||
@@ -1817,7 +1816,7 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot( host->mmc->caps2 |=MMC_CAP2_NO_PRESCAN_POWERUP ;if (slot->cd_idx >=0 ) { - ret =mmc_gpiod_request_cd (host->mmc, slot->cd_con_id, slot->cd_idx, + ret =mmc_gpiod_request_cd (host->mmc,NULL , slot->cd_idx, slot->cd_override_level,0 ,NULL );if (ret == -EPROBE_DEFER ) goto remove;
drivers/mmc/host/sdhci-pci.h +0 -1
@@ -81,7 +81,6 @@ struct sdhci_pci_slot {int cd_gpio;int cd_irq; -char *cd_con_id;int cd_idx;bool cd_override_level;
Signature · 1 line
2.11.0
PATCH 2/2 mmc: slot-gpio: Don't override con_id when request descriptor
The caller may supply connection ID, index, or both. All combinations are possible and mmc framework should not make any assumption on what exactly caller wants.
Remove con_id override conditionals in mmc_gpiod_request_ro() and mmc_gpiod_request_cd().
--- drivers/mmc/core/slot-gpio.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/mmc/core/slot-gpio.c +0 -6
@@ -235,9 +235,6 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,struct gpio_desc *desc;int ret; -if (!con_id) - con_id = ctx->cd_label; - desc =devm_gpiod_get_index (host->parent, con_id, idx,GPIOD_IN );if (IS_ERR (desc))return PTR_ERR (desc);
@@ -289,9 +286,6 @@ int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,struct gpio_desc *desc;int ret; -if (!con_id) - con_id = ctx->ro_label; - desc =devm_gpiod_get_index (host->parent, con_id, idx,GPIOD_IN );if (IS_ERR (desc))return PTR_ERR (desc);
Signature · 1 line
2.11.0
Ulf Hansson
AppliedRe: [PATCH v1 2/2] mmc: slot-gpio: Don't override con_id when request descriptor
Quoted 9 lines · Andy Shevchenko
The caller may supply connection ID, index, or both. All combinations are possible and mmc framework should not make any assumption on what exactly caller wants.
Remove
con_idoverride conditionals inmmc_gpiod_request_ro()andmmc_gpiod_request_cd().Acked-by Adrian Hunter <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
Thanks, applied for next!
Kind regards
Uffe
Quoted 31 lines
--- drivers/mmc/core/slot-gpio.c | 6 ------ 1 file changed, 6 deletions(-)drivers/mmc/core/slot-gpio.c +0
-7@@ -235,9 +235,6 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,struct gpio_desc *desc;int ret; -if (!con_id) - con_id = ctx->cd_label; - desc =devm_gpiod_get_index (host->parent, con_id, idx,GPIOD_IN );if (IS_ERR (desc))return PTR_ERR (desc);@@ -289,9 +286,6 @@ int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,struct gpio_desc *desc;int ret; -if (!con_id) - con_id = ctx->ro_label; - desc =devm_gpiod_get_index (host->parent, con_id, idx,GPIOD_IN );if (IS_ERR (desc))return PTR_ERR (desc); --2.11.0
Quoted 4 lines · Andy Shevchenko
cd_con_idis not used and always NULL.
Remove it to make code a bit more cleaner.Signed-off-by Andy Shevchenko <[email protected]>
Quoted 39 lines
--- drivers/mmc/host/sdhci-pci-core.c | 3 +-- drivers/mmc/host/sdhci-pci.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-)drivers/mmc/host/sdhci-pci-core.c +1
-2@@ -424,7 +424,6 @@ static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot)static int byt_sd_probe_slot (struct sdhci_pci_slot *slot) { slot->host->mmc->caps |=MMC_CAP_WAIT_WHILE_BUSY ; - slot->cd_con_id =NULL ; slot->cd_idx =0 ; slot->cd_override_level = true; if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BXT_SD ||@@ -1817,7 +1816,7 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot( host->mmc->caps2 |=MMC_CAP2_NO_PRESCAN_POWERUP ;if (slot->cd_idx >=0 ) { - ret =mmc_gpiod_request_cd (host->mmc, slot->cd_con_id, slot->cd_idx, + ret =mmc_gpiod_request_cd (host->mmc,NULL , slot->cd_idx, slot->cd_override_level,0 ,NULL );if (ret == -EPROBE_DEFER ) goto remove;drivers/mmc/host/sdhci-pci.h +0
-1@@ -81,7 +81,6 @@ struct sdhci_pci_slot {int cd_gpio;int cd_irq; -char *cd_con_id;int cd_idx;bool cd_override_level;
Ulf Hansson
AppliedQuoted 4 lines · Andy Shevchenko
cd_con_idis not used and always NULL.
Remove it to make code a bit more cleaner.Signed-off-by Andy Shevchenko <[email protected]>
Thanks, applied for next!
Kind regards
Uffe
Quoted 41 lines
--- drivers/mmc/host/sdhci-pci-core.c | 3 +-- drivers/mmc/host/sdhci-pci.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-)drivers/mmc/host/sdhci-pci-core.c +1
-2@@ -424,7 +424,6 @@ static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot)static int byt_sd_probe_slot (struct sdhci_pci_slot *slot) { slot->host->mmc->caps |=MMC_CAP_WAIT_WHILE_BUSY ; - slot->cd_con_id =NULL ; slot->cd_idx =0 ; slot->cd_override_level = true; if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BXT_SD ||@@ -1817,7 +1816,7 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot( host->mmc->caps2 |=MMC_CAP2_NO_PRESCAN_POWERUP ;if (slot->cd_idx >=0 ) { - ret =mmc_gpiod_request_cd (host->mmc, slot->cd_con_id, slot->cd_idx, + ret =mmc_gpiod_request_cd (host->mmc,NULL , slot->cd_idx, slot->cd_override_level,0 ,NULL );if (ret == -EPROBE_DEFER ) goto remove;drivers/mmc/host/sdhci-pci.h +0
-2@@ -81,7 +81,6 @@ struct sdhci_pci_slot {int cd_gpio;int cd_irq; -char *cd_con_id;int cd_idx;bool cd_override_level; --2.11.0