From c5a66dd8926baa60235bc8844925c36a1b83f488 Mon Sep 17 00:00:00 2001 From: Heiner Kallweit Date: Wed, 15 Feb 2023 21:01:43 +0100 Subject: [PATCH] mmc: meson-gx: constify member data of struct meson_host Constify member data of struct meson_host. This also allows to remove the cast as of_device_get_match_data() returns a const void *. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/70e5520f-e327-111d-9ea4-824460e41561@gmail.com Signed-off-by: Ulf Hansson --- drivers/mmc/host/meson-gx-mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 6ed95c5..641ea42 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -150,7 +150,7 @@ struct sd_emmc_desc { struct meson_host { struct device *dev; - struct meson_mmc_data *data; + const struct meson_mmc_data *data; struct mmc_host *mmc; struct mmc_command *cmd; @@ -1195,8 +1195,7 @@ static int meson_mmc_probe(struct platform_device *pdev) if (mmc->caps & MMC_CAP_SDIO_IRQ) mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD; - host->data = (struct meson_mmc_data *) - of_device_get_match_data(&pdev->dev); + host->data = of_device_get_match_data(&pdev->dev); if (!host->data) return -EINVAL; -- 2.7.4