Skip to content

Commit dba914b

Browse files
claudiubezneastorulf
authored andcommitted
mmc: pwrseq: sd8787: fix compilation warning
Fixed compilation warning "cast from pointer to integer of different size [-Wpointer-to-int-cast]" Fixes: b2832b9 ("mmc: pwrseq: sd8787: add support for wilc1000") Reported-by: kernel test robot <[email protected]> Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Claudiu Beznea <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent e72a55f commit dba914b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/mmc/core/pwrseq_sd8787.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@ static const struct mmc_pwrseq_ops mmc_pwrseq_sd8787_ops = {
5656
.power_off = mmc_pwrseq_sd8787_power_off,
5757
};
5858

59+
static const u32 sd8787_delay_ms = 300;
60+
static const u32 wilc1000_delay_ms = 5;
61+
5962
static const struct of_device_id mmc_pwrseq_sd8787_of_match[] = {
60-
{ .compatible = "mmc-pwrseq-sd8787", .data = (void *)300 },
61-
{ .compatible = "mmc-pwrseq-wilc1000", .data = (void *)5 },
63+
{ .compatible = "mmc-pwrseq-sd8787", .data = &sd8787_delay_ms },
64+
{ .compatible = "mmc-pwrseq-wilc1000", .data = &wilc1000_delay_ms },
6265
{/* sentinel */},
6366
};
6467
MODULE_DEVICE_TABLE(of, mmc_pwrseq_sd8787_of_match);
@@ -74,7 +77,7 @@ static int mmc_pwrseq_sd8787_probe(struct platform_device *pdev)
7477
return -ENOMEM;
7578

7679
match = of_match_node(mmc_pwrseq_sd8787_of_match, pdev->dev.of_node);
77-
pwrseq->reset_pwrdwn_delay_ms = (u32)match->data;
80+
pwrseq->reset_pwrdwn_delay_ms = *(u32 *)match->data;
7881

7982
pwrseq->pwrdn_gpio = devm_gpiod_get(dev, "powerdown", GPIOD_OUT_LOW);
8083
if (IS_ERR(pwrseq->pwrdn_gpio))

0 commit comments

Comments
 (0)