提交 dba914b2 编写于 作者: C Claudiu Beznea 提交者: Ulf Hansson

mmc: pwrseq: sd8787: fix compilation warning

Fixed compilation warning "cast from pointer to integer of
different size [-Wpointer-to-int-cast]"

Fixes: b2832b96 ("mmc: pwrseq: sd8787: add support for wilc1000")
Reported-by: Nkernel test robot <lkp@intel.com>
Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20210825081931.598934-1-claudiu.beznea@microchip.comSigned-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 e72a55f2
...@@ -56,9 +56,12 @@ static const struct mmc_pwrseq_ops mmc_pwrseq_sd8787_ops = { ...@@ -56,9 +56,12 @@ static const struct mmc_pwrseq_ops mmc_pwrseq_sd8787_ops = {
.power_off = mmc_pwrseq_sd8787_power_off, .power_off = mmc_pwrseq_sd8787_power_off,
}; };
static const u32 sd8787_delay_ms = 300;
static const u32 wilc1000_delay_ms = 5;
static const struct of_device_id mmc_pwrseq_sd8787_of_match[] = { static const struct of_device_id mmc_pwrseq_sd8787_of_match[] = {
{ .compatible = "mmc-pwrseq-sd8787", .data = (void *)300 }, { .compatible = "mmc-pwrseq-sd8787", .data = &sd8787_delay_ms },
{ .compatible = "mmc-pwrseq-wilc1000", .data = (void *)5 }, { .compatible = "mmc-pwrseq-wilc1000", .data = &wilc1000_delay_ms },
{/* sentinel */}, {/* sentinel */},
}; };
MODULE_DEVICE_TABLE(of, mmc_pwrseq_sd8787_of_match); MODULE_DEVICE_TABLE(of, mmc_pwrseq_sd8787_of_match);
...@@ -74,7 +77,7 @@ static int mmc_pwrseq_sd8787_probe(struct platform_device *pdev) ...@@ -74,7 +77,7 @@ static int mmc_pwrseq_sd8787_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
match = of_match_node(mmc_pwrseq_sd8787_of_match, pdev->dev.of_node); match = of_match_node(mmc_pwrseq_sd8787_of_match, pdev->dev.of_node);
pwrseq->reset_pwrdwn_delay_ms = (u32)match->data; pwrseq->reset_pwrdwn_delay_ms = *(u32 *)match->data;
pwrseq->pwrdn_gpio = devm_gpiod_get(dev, "powerdown", GPIOD_OUT_LOW); pwrseq->pwrdn_gpio = devm_gpiod_get(dev, "powerdown", GPIOD_OUT_LOW);
if (IS_ERR(pwrseq->pwrdn_gpio)) if (IS_ERR(pwrseq->pwrdn_gpio))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册