]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: phy: msm: cast to enum msm_usb_phy_type
authorFelipe Balbi <balbi@ti.com>
Wed, 30 Apr 2014 16:33:04 +0000 (11:33 -0500)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 May 2014 17:34:23 +0000 (12:34 -0500)
this solves the following build warning found when
running compile tests.

drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:
drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
to integer of different size [-Wpointer-to-int-cast]
  pdata->phy_type = (int) id->data;
                    ^
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-msm-usb.c

index 9dc79180b9340d8d5e9d5e01062fc94afdf9d1ba..591b406fd7f7844696dd3690fbc8a6770a01f863 100644 (file)
@@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
        motg->pdata = pdata;
 
        id = of_match_device(msm_otg_dt_match, &pdev->dev);
-       pdata->phy_type = (int) id->data;
+       pdata->phy_type = (enum msm_usb_phy_type) id->data;
 
        motg->link_rst = devm_reset_control_get(&pdev->dev, "link");
        if (IS_ERR(motg->link_rst))