Skip to content

Commit c3dd25c

Browse files
arndblinusw
authored andcommitted
pinctrl: fix qcom ssbi drivers for 64-bit compilation
When building pinctrl-ssbi-gpio and pinctrl-ssbi-mpp for ARM64, we get a compile warning about invalid types: drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c: In function 'pm8xxx_gpio_probe': drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c:675:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c: In function 'pm8xxx_mpp_probe': drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c:766:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] This changes the code so we cast the pointer to 'unsigned long', which is the right thing to do here. Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 0563df2 commit c3dd25c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
672672
return -ENOMEM;
673673

674674
pctrl->dev = &pdev->dev;
675-
pctrl->npins = (unsigned)of_device_get_match_data(&pdev->dev);
675+
pctrl->npins = (unsigned long)of_device_get_match_data(&pdev->dev);
676676

677677
pctrl->regmap = dev_get_regmap(pdev->dev.parent, NULL);
678678
if (!pctrl->regmap) {

drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
763763
return -ENOMEM;
764764

765765
pctrl->dev = &pdev->dev;
766-
pctrl->npins = (unsigned)of_device_get_match_data(&pdev->dev);
766+
pctrl->npins = (unsigned long)of_device_get_match_data(&pdev->dev);
767767

768768
pctrl->regmap = dev_get_regmap(pdev->dev.parent, NULL);
769769
if (!pctrl->regmap) {

0 commit comments

Comments
 (0)