[...] >> > Other alternative: > > typedef void (*hw_reset_t)(struct mmc_host *host); > > hw_reset_t mmc_get_hw_reset(struct mmc_host *host) > { > struct mmc_pwrseq *p = host->pwrseq; > > if (host->ops->hw_reset) > return host->ops->hw_reset; > else if (p && p->ops->reset) > return p->ops->reset; > else > return NULL; > } > > And then use what mmc_get_hw_reset returns instead of using > host->ops->hw_reset directly. > > How do you like this one? Well, I would just rather do these checks and call the correct callback in mmc_reset(). There is no need to invent a function returning a function pointer when we call it directly instead. Additionally, I wonder whether it could make sense to allow both callbacks to co-exist and then call both. This would give the mmc host some options for doing some internal reset as well, while the pwrseq could handle the actual GPIO pin. What do you think? Kind regards Uffe > >>>> void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card); >>>> >>>> #endif /* LINUX_MMC_CORE_H */ >>>> -- >>>> 2.11.0 >>>> >>>> >>> >>> Kind regards >>> Uffe >>> >> > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html