]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
I2C: TWL4030: Cleanup twl4030-usb.c
authorFelipe Balbi <felipe.balbi@nokia.com>
Thu, 27 Mar 2008 17:16:04 +0000 (19:16 +0200)
committerTony Lindgren <tony@atomide.com>
Fri, 28 Mar 2008 07:45:50 +0000 (09:45 +0200)
General cleanup on twl4030-usb.c

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/i2c/chips/twl4030-usb.c
drivers/usb/musb/omap2430.c

index cf86d3e80f8759e6ec51eafad8bb40d638e4c0b9..eca5aef2cb72d32515df9f5d2d801f541d1c94ef 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/time.h>
 #include <linux/interrupt.h>
 #include <linux/usb.h>
-
 #include <linux/i2c/twl4030.h>
 
 /* Register defines */
 
 /*-------------------------------------------------------------------------*/
 
+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;
 
index e19a15e110b199a1db867e235fe7208eba3941ff..eacd6c4c0434a08b037e527e1cdf63e60a7344bc 100644 (file)
@@ -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))