Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: mmc_spi: Remove platform data .get_cd() and .get_ro() callbacks

All platforms now pass the CD and RO GPIOs to the MMC SPI driver, those
callbacks are not used anymore. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Chris Ball <cjb@laptop.org>

authored by

Laurent Pinchart and committed by
Chris Ball
62b6af5c f0af3689

+2 -31
+2 -22
drivers/mmc/host/mmc_spi.c
··· 1273 1273 } 1274 1274 } 1275 1275 1276 - static int mmc_spi_get_ro(struct mmc_host *mmc) 1277 - { 1278 - struct mmc_spi_host *host = mmc_priv(mmc); 1279 - 1280 - if (host->pdata && host->pdata->get_ro) 1281 - return !!host->pdata->get_ro(mmc->parent); 1282 - else 1283 - return mmc_gpio_get_ro(mmc); 1284 - } 1285 - 1286 - static int mmc_spi_get_cd(struct mmc_host *mmc) 1287 - { 1288 - struct mmc_spi_host *host = mmc_priv(mmc); 1289 - 1290 - if (host->pdata && host->pdata->get_cd) 1291 - return !!host->pdata->get_cd(mmc->parent); 1292 - else 1293 - return mmc_gpio_get_cd(mmc); 1294 - } 1295 - 1296 1276 static const struct mmc_host_ops mmc_spi_ops = { 1297 1277 .request = mmc_spi_request, 1298 1278 .set_ios = mmc_spi_set_ios, 1299 - .get_ro = mmc_spi_get_ro, 1300 - .get_cd = mmc_spi_get_cd, 1279 + .get_ro = mmc_gpio_get_ro, 1280 + .get_cd = mmc_gpio_get_cd, 1301 1281 }; 1302 1282 1303 1283
-9
include/linux/spi/mmc_spi.h
··· 26 26 void *); 27 27 void (*exit)(struct device *, void *); 28 28 29 - /* sense switch on sd cards */ 30 - int (*get_ro)(struct device *); 31 - 32 - /* 33 - * If board does not use CD interrupts, driver can optimize polling 34 - * using this function. 35 - */ 36 - int (*get_cd)(struct device *); 37 - 38 29 /* 39 30 * Card Detect and Read Only GPIOs. To enable debouncing on the card 40 31 * detect GPIO, set the cd_debounce to the debounce time in