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

mmc: tmio-mmc: Remove .get_cd() callback from platform data

All platforms pass the CD GPIO number to the driver in the .cd_gpio
field. The .get_cd() callback isn't used anymore, remove it

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>

authored by

Laurent Pinchart and committed by
Chris Ball
2b63b341 1036563e

+1 -16
+1 -15
drivers/mmc/host/tmio_mmc_pio.c
··· 936 936 (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)); 937 937 } 938 938 939 - static int tmio_mmc_get_cd(struct mmc_host *mmc) 940 - { 941 - struct tmio_mmc_host *host = mmc_priv(mmc); 942 - struct tmio_mmc_data *pdata = host->pdata; 943 - int ret = mmc_gpio_get_cd(mmc); 944 - if (ret >= 0) 945 - return ret; 946 - 947 - if (!pdata->get_cd) 948 - return -ENOSYS; 949 - else 950 - return pdata->get_cd(host->pdev); 951 - } 952 - 953 939 static const struct mmc_host_ops tmio_mmc_ops = { 954 940 .request = tmio_mmc_request, 955 941 .set_ios = tmio_mmc_set_ios, 956 942 .get_ro = tmio_mmc_get_ro, 957 - .get_cd = tmio_mmc_get_cd, 943 + .get_cd = mmc_gpio_get_cd, 958 944 .enable_sdio_irq = tmio_mmc_enable_sdio_irq, 959 945 }; 960 946
-1
include/linux/mfd/tmio.h
··· 108 108 unsigned int cd_gpio; 109 109 void (*set_pwr)(struct platform_device *host, int state); 110 110 void (*set_clk_div)(struct platform_device *host, int state); 111 - int (*get_cd)(struct platform_device *host); 112 111 int (*write16_hook)(struct tmio_mmc_host *host, int addr); 113 112 /* clock management callbacks */ 114 113 int (*clk_enable)(struct platform_device *pdev, unsigned int *f);