Skip to content

Commit c5a66dd

Browse files
hkallweitstorulf
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 4c4fe4f commit c5a66dd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/mmc/host/meson-gx-mmc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ struct sd_emmc_desc {
150150

151151
struct meson_host {
152152
struct device *dev;
153-
struct meson_mmc_data *data;
153+
const struct meson_mmc_data *data;
154154
struct mmc_host *mmc;
155155
struct mmc_command *cmd;
156156

@@ -1195,8 +1195,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
11951195
if (mmc->caps & MMC_CAP_SDIO_IRQ)
11961196
mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;
11971197

1198-
host->data = (struct meson_mmc_data *)
1199-
of_device_get_match_data(&pdev->dev);
1198+
host->data = of_device_get_match_data(&pdev->dev);
12001199
if (!host->data)
12011200
return -EINVAL;
12021201

0 commit comments

Comments
 (0)