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
This commit is contained in:
lucaswei 2022-02-03 16:58:24 -07:00 committed by Michael Bestas
parent 3447e16b78
commit 49338de1fb
No known key found for this signature in database
GPG Key ID: CC95044519BE6669

View File

@ -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);