[PATCH 4/7] I2C: TWL4030: Cleanup twl4030-usb.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



General cleanup on twl4030-usb.c

Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx>
---
 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 cf86d3e..eca5aef 100644
--- a/drivers/i2c/chips/twl4030-usb.c
+++ b/drivers/i2c/chips/twl4030-usb.c
@@ -28,7 +28,6 @@
 #include <linux/time.h>
 #include <linux/interrupt.h>
 #include <linux/usb.h>
-
 #include <linux/i2c/twl4030.h>
 
 /* 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 e19a15e..eacd6c4 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))
-- 
1.5.5.rc1.12.g660b9

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux