From 49338de1fb8a2690ccd0195db07566b53e00b6ff Mon Sep 17 00:00:00 2001 From: lucaswei Date: Thu, 3 Feb 2022 16:58:24 -0700 Subject: [PATCH] drivers: regulator: Fix -Wpointer-to-int-cast. drivers/regulator/qpnp-lcdb-regulator.c:2734:18: warning: cast to smaller integer type 'u8' (aka 'unsigned char') from 'const void *' [-Wvoid-pointer-to-int-cast] lcdb->subtype = (u8)of_device_get_match_data(&pdev->dev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: Ief3f187811f5a15c1c89037bc97896c0374415ef --- drivers/regulator/qpnp-lcdb-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/qpnp-lcdb-regulator.c b/drivers/regulator/qpnp-lcdb-regulator.c index a26d59cb1246..d12f6567e612 100644 --- a/drivers/regulator/qpnp-lcdb-regulator.c +++ b/drivers/regulator/qpnp-lcdb-regulator.c @@ -2731,7 +2731,7 @@ static int qpnp_lcdb_regulator_probe(struct platform_device *pdev) return -EINVAL; } - lcdb->subtype = (u8)of_device_get_match_data(&pdev->dev); + lcdb->subtype = (u8)(long)of_device_get_match_data(&pdev->dev); lcdb->dev = &pdev->dev; lcdb->pdev = pdev; dev_id = of_match_device(lcdb->dev->driver->of_match_table, lcdb->dev);