diff options
Diffstat (limited to 'drivers/usb/phy/phy-twl6030-usb.c')
| -rw-r--r-- | drivers/usb/phy/phy-twl6030-usb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c index 1753bd367e0..04778cf80d6 100644 --- a/drivers/usb/phy/phy-twl6030-usb.c +++ b/drivers/usb/phy/phy-twl6030-usb.c @@ -27,12 +27,13 @@ #include <linux/io.h> #include <linux/usb/musb-omap.h> #include <linux/usb/phy_companion.h> -#include <linux/usb/omap_usb.h> +#include <linux/phy/omap_usb.h> #include <linux/i2c/twl.h> #include <linux/regulator/consumer.h> #include <linux/err.h> #include <linux/slab.h> #include <linux/delay.h> +#include <linux/of.h> /* usb register definitions */ #define USB_VENDOR_ID_LSB 0x00 @@ -126,7 +127,8 @@ static inline int twl6030_writeb(struct twl6030_usb *twl, u8 module, static inline u8 twl6030_readb(struct twl6030_usb *twl, u8 module, u8 address) { - u8 data, ret = 0; + u8 data; + int ret; ret = twl_i2c_read_u8(module, &data, address); if (ret >= 0) @@ -324,9 +326,9 @@ static int twl6030_usb_probe(struct platform_device *pdev) int status, err; struct device_node *np = pdev->dev.of_node; struct device *dev = &pdev->dev; - struct twl4030_usb_data *pdata = dev->platform_data; + struct twl4030_usb_data *pdata = dev_get_platdata(dev); - twl = devm_kzalloc(dev, sizeof *twl, GFP_KERNEL); + twl = devm_kzalloc(dev, sizeof(*twl), GFP_KERNEL); if (!twl) return -ENOMEM; |
