mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
mmc: mmc_spi: Make of_mmc_spi.c resource provider agnostic
In order to use the same driver on non-OF platforms, make of_mmc_spi.c resource provider agnostic. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210419112459.25241-6-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
committed by
Ulf Hansson
parent
7240803b2b
commit
edd6021465
@@ -35,16 +35,7 @@ struct mmc_spi_platform_data {
|
||||
void (*setpower)(struct device *, unsigned int maskval);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
extern struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi);
|
||||
extern void mmc_spi_put_pdata(struct spi_device *spi);
|
||||
#else
|
||||
static inline struct mmc_spi_platform_data *
|
||||
mmc_spi_get_pdata(struct spi_device *spi)
|
||||
{
|
||||
return spi->dev.platform_data;
|
||||
}
|
||||
static inline void mmc_spi_put_pdata(struct spi_device *spi) {}
|
||||
#endif /* CONFIG_OF */
|
||||
|
||||
#endif /* __LINUX_SPI_MMC_SPI_H */
|
||||
|
||||
Reference in New Issue
Block a user