Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b63b341 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Chris Ball
Browse files

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: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 1036563e
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -936,25 +936,11 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
		 (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT));
}

static int tmio_mmc_get_cd(struct mmc_host *mmc)
{
	struct tmio_mmc_host *host = mmc_priv(mmc);
	struct tmio_mmc_data *pdata = host->pdata;
	int ret = mmc_gpio_get_cd(mmc);
	if (ret >= 0)
		return ret;

	if (!pdata->get_cd)
		return -ENOSYS;
	else
		return pdata->get_cd(host->pdev);
}

static const struct mmc_host_ops tmio_mmc_ops = {
	.request	= tmio_mmc_request,
	.set_ios	= tmio_mmc_set_ios,
	.get_ro         = tmio_mmc_get_ro,
	.get_cd		= tmio_mmc_get_cd,
	.get_cd		= mmc_gpio_get_cd,
	.enable_sdio_irq = tmio_mmc_enable_sdio_irq,
};

+0 −1
Original line number Diff line number Diff line
@@ -108,7 +108,6 @@ struct tmio_mmc_data {
	unsigned int			cd_gpio;
	void (*set_pwr)(struct platform_device *host, int state);
	void (*set_clk_div)(struct platform_device *host, int state);
	int (*get_cd)(struct platform_device *host);
	int (*write16_hook)(struct tmio_mmc_host *host, int addr);
	/* clock management callbacks */
	int (*clk_enable)(struct platform_device *pdev, unsigned int *f);