diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2016-10-05 05:11:23 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-10-10 08:20:48 -0400 |
commit | 6bc090631dfc3394da0619e920662e6636dbe89c (patch) | |
tree | bc598a71d1963b9eb46e8dcd864e747c48d4374c /drivers/mmc | |
parent | 606d313124094d87050896a10894200cdd2b0514 (diff) |
mmc: sdhci-pci: Let devices define their own sdhci_ops
Let devices define their own sdhci_ops so that device-specific variations
can be implemented without adding quirks.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-pci-core.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-pci.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c index 72a1f1f5180a..5e11e0e3be63 100644 --- a/drivers/mmc/host/sdhci-pci-core.c +++ b/drivers/mmc/host/sdhci-pci-core.c | |||
@@ -1648,7 +1648,9 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot( | |||
1648 | } | 1648 | } |
1649 | 1649 | ||
1650 | host->hw_name = "PCI"; | 1650 | host->hw_name = "PCI"; |
1651 | host->ops = &sdhci_pci_ops; | 1651 | host->ops = chip->fixes && chip->fixes->ops ? |
1652 | chip->fixes->ops : | ||
1653 | &sdhci_pci_ops; | ||
1652 | host->quirks = chip->quirks; | 1654 | host->quirks = chip->quirks; |
1653 | host->quirks2 = chip->quirks2; | 1655 | host->quirks2 = chip->quirks2; |
1654 | 1656 | ||
diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h index 9c7c08b93223..6bccf56bc5ff 100644 --- a/drivers/mmc/host/sdhci-pci.h +++ b/drivers/mmc/host/sdhci-pci.h | |||
@@ -65,6 +65,8 @@ struct sdhci_pci_fixes { | |||
65 | 65 | ||
66 | int (*suspend) (struct sdhci_pci_chip *); | 66 | int (*suspend) (struct sdhci_pci_chip *); |
67 | int (*resume) (struct sdhci_pci_chip *); | 67 | int (*resume) (struct sdhci_pci_chip *); |
68 | |||
69 | const struct sdhci_ops *ops; | ||
68 | }; | 70 | }; |
69 | 71 | ||
70 | struct sdhci_pci_slot { | 72 | struct sdhci_pci_slot { |