Merge branch 'for-linus' of git://git.infradead.org/users/eparis/selinux into for...
[pandora-kernel.git] / arch / arm / mach-omap2 / board-cm-t3517.c
index a27e3ee..c3a9fd3 100644 (file)
@@ -48,6 +48,7 @@
 
 #include "mux.h"
 #include "control.h"
+#include "common-board-devices.h"
 
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
 static struct gpio_led cm_t3517_leds[] = {
@@ -148,14 +149,13 @@ static void __init cm_t3517_init_rtc(void)
 {
        int err;
 
-       err = gpio_request(RTC_CS_EN_GPIO, "rtc cs en");
+       err = gpio_request_one(RTC_CS_EN_GPIO, GPIOF_OUT_INIT_HIGH,
+                              "rtc cs en");
        if (err) {
                pr_err("CM-T3517: rtc cs en gpio request failed: %d\n", err);
                return;
        }
 
-       gpio_direction_output(RTC_CS_EN_GPIO, 1);
-
        platform_device_register(&cm_t3517_rtc_device);
 }
 #else
@@ -178,15 +178,15 @@ static struct usbhs_omap_board_data cm_t3517_ehci_pdata __initdata = {
        .reset_gpio_port[2]  = -EINVAL,
 };
 
-static int cm_t3517_init_usbh(void)
+static int __init cm_t3517_init_usbh(void)
 {
        int err;
 
-       err = gpio_request(USB_HUB_RESET_GPIO, "usb hub rst");
+       err = gpio_request_one(USB_HUB_RESET_GPIO, GPIOF_OUT_INIT_LOW,
+                              "usb hub rst");
        if (err) {
                pr_err("CM-T3517: usb hub rst gpio request failed: %d\n", err);
        } else {
-               gpio_direction_output(USB_HUB_RESET_GPIO, 0);
                udelay(10);
                gpio_set_value(USB_HUB_RESET_GPIO, 1);
                msleep(1);
@@ -204,8 +204,6 @@ static inline int cm_t3517_init_usbh(void)
 #endif
 
 #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
-#define NAND_BLOCK_SIZE                SZ_128K
-
 static struct mtd_partition cm_t3517_nand_partitions[] = {
        {
                .name           = "xloader",