Skip to content

Commit

Permalink
mmc: meson-gx: constify member data of struct meson_host
Browse files Browse the repository at this point in the history
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 <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/70e5520f-e327-111d-9ea4-824460e41561@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Heiner Kallweit authored and Ulf Hansson committed Feb 17, 2023
1 parent 4c4fe4f commit c5a66dd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/mmc/host/meson-gx-mmc.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit c5a66dd

Please sign in to comment.