diff --git a/drivers/power/supply/qcom/smb1390-charger-psy.c b/drivers/power/supply/qcom/smb1390-charger-psy.c index 7a4127e5a187..fcc6de58c203 100644 --- a/drivers/power/supply/qcom/smb1390-charger-psy.c +++ b/drivers/power/supply/qcom/smb1390-charger-psy.c @@ -2101,7 +2101,7 @@ static int smb1390_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, chip); - chip->cp_role = (int)of_device_get_match_data(chip->dev); + chip->cp_role = (int)(unsigned long)of_device_get_match_data(chip->dev); switch (chip->cp_role) { case CP_MASTER: rc = smb1390_master_probe(chip); diff --git a/drivers/power/supply/qcom/smb1398-charger.c b/drivers/power/supply/qcom/smb1398-charger.c index 513b49c0a31f..ec763cc31708 100644 --- a/drivers/power/supply/qcom/smb1398-charger.c +++ b/drivers/power/supply/qcom/smb1398-charger.c @@ -2732,7 +2732,7 @@ static int smb1398_probe(struct platform_device *pdev) chip->disabled = true; platform_set_drvdata(pdev, chip); - chip->div2_cp_role = (int)of_device_get_match_data(chip->dev); + chip->div2_cp_role = (int)(unsigned long)of_device_get_match_data(chip->dev); switch (chip->div2_cp_role) { case DIV2_CP_MASTER: case SMB1394_DIV2_CP_PRY: