From c43cc5a715fb5acf9b2652f8a8fd89fc90f77a2d Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Thu, 27 Mar 2008 19:16:04 +0200 Subject: [PATCH] I2C: TWL4030: Cleanup twl4030-usb.c General cleanup on twl4030-usb.c Signed-off-by: Felipe Balbi Signed-off-by: Tony Lindgren --- drivers/i2c/chips/twl4030-usb.c | 27 +++++++++++++-------------- drivers/usb/musb/omap2430.c | 1 - 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/i2c/chips/twl4030-usb.c b/drivers/i2c/chips/twl4030-usb.c index cf86d3e80f8..eca5aef2cb7 100644 --- a/drivers/i2c/chips/twl4030-usb.c +++ b/drivers/i2c/chips/twl4030-usb.c @@ -28,7 +28,6 @@ #include #include #include - #include /* Register defines */ @@ -248,6 +247,18 @@ /*-------------------------------------------------------------------------*/ +struct twl4030_usb { + int irq; + u8 usb_mode; /* pin configuration */ +#define T2_USB_MODE_ULPI 1 +/* #define T2_USB_MODE_CEA2011_3PIN 2 */ + u8 asleep; +}; + +static struct twl4030_usb *the_transceiver; + +/*-------------------------------------------------------------------------*/ + static int twl4030_i2c_write_u8_verify(u8 module, u8 data, u8 address) { u8 check; @@ -307,18 +318,6 @@ static inline int twl4030_usb_read(u8 address) /*-------------------------------------------------------------------------*/ -struct twl4030_usb { - int irq; - u8 usb_mode; /* pin configuration */ -#define T2_USB_MODE_ULPI 1 -/* #define T2_USB_MODE_CEA2011_3PIN 2 */ - u8 asleep; -}; - -static struct twl4030_usb *the_transceiver; - -/*-------------------------------------------------------------------------*/ - static inline int twl4030_usb_set_bits(struct twl4030_usb *twl, u8 reg, u8 bits) { @@ -616,7 +615,7 @@ static int __init twl4030_usb_init(void) if (the_transceiver) return 0; - twl = kcalloc(1, sizeof *twl, GFP_KERNEL); + twl = kzalloc(sizeof *twl, GFP_KERNEL); if (!twl) return 0; diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index e19a15e110b..eacd6c4c043 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -227,7 +227,6 @@ int __init musb_platform_init(struct musb *musb) omap_vbus_power(musb, musb->board_mode == MUSB_HOST, 1); - if (is_host_enabled(musb)) musb->board_set_vbus = omap_set_vbus; if (is_peripheral_enabled(musb)) -- 2.41.1