On 4/01/19 4:26 AM, Ernest Zhang(WH) wrote: > Moving sdhci_o2 into sdhci-pci-o2micro.c > > Signed-off-by: Ernest Zhang <ernest.zhang@xxxxxxxxxxxxxx> Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> > --- > Change in V4: > Fix compile error by move sdhci_o2 declaration to the end of file > > Change in V3: > 1. Change the patches order to make this the first patch > 2. Remove the other unneeded o2 declarations in sdhci-pci.h > > Change in V2: > 1. Moving sdhci_o2 into sdhci-pci-o2micro.c > > Change in V1: > N/A > --- > drivers/mmc/host/sdhci-pci-core.c | 10 ---------- > drivers/mmc/host/sdhci-pci-o2micro.c | 10 ++++++++++ > drivers/mmc/host/sdhci-pci.h | 6 +----- > 3 files changed, 11 insertions(+), 15 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c > index 2a6eba74b94e..99b0fec2836b 100644 > --- a/drivers/mmc/host/sdhci-pci-core.c > +++ b/drivers/mmc/host/sdhci-pci-core.c > @@ -1257,16 +1257,6 @@ static int jmicron_resume(struct sdhci_pci_chip *chip) > } > #endif > > -static const struct sdhci_pci_fixes sdhci_o2 = { > - .probe = sdhci_pci_o2_probe, > - .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, > - .quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD, > - .probe_slot = sdhci_pci_o2_probe_slot, > -#ifdef CONFIG_PM_SLEEP > - .resume = sdhci_pci_o2_resume, > -#endif > -}; > - > static const struct sdhci_pci_fixes sdhci_jmicron = { > .probe = jmicron_probe, > > diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c > index cc3ffeffd7a2..c91bd55080c9 100644 > --- a/drivers/mmc/host/sdhci-pci-o2micro.c > +++ b/drivers/mmc/host/sdhci-pci-o2micro.c > @@ -550,3 +550,13 @@ int sdhci_pci_o2_resume(struct sdhci_pci_chip *chip) > return sdhci_pci_resume_host(chip); > } > #endif > + > +const struct sdhci_pci_fixes sdhci_o2 = { > + .probe = sdhci_pci_o2_probe, > + .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, > + .quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD, > + .probe_slot = sdhci_pci_o2_probe_slot, > +#ifdef CONFIG_PM_SLEEP > + .resume = sdhci_pci_o2_resume, > +#endif > +}; > diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h > index 2ef0bdca9197..4ddb69a15cd7 100644 > --- a/drivers/mmc/host/sdhci-pci.h > +++ b/drivers/mmc/host/sdhci-pci.h > @@ -179,13 +179,9 @@ static inline void *sdhci_pci_priv(struct sdhci_pci_slot *slot) > int sdhci_pci_resume_host(struct sdhci_pci_chip *chip); > #endif > int sdhci_pci_enable_dma(struct sdhci_host *host); > -int sdhci_pci_o2_probe_slot(struct sdhci_pci_slot *slot); > -int sdhci_pci_o2_probe(struct sdhci_pci_chip *chip); > -#ifdef CONFIG_PM_SLEEP > -int sdhci_pci_o2_resume(struct sdhci_pci_chip *chip); > -#endif > > extern const struct sdhci_pci_fixes sdhci_arasan; > extern const struct sdhci_pci_fixes sdhci_snps; > +extern const struct sdhci_pci_fixes sdhci_o2; > > #endif /* __SDHCI_PCI_H */ >