[Defy Android Development] Epsylon3:
almost no change in kernel from previous 4.5.1

From b2ffd2f512a82481cd7f812113ef6e40e82d0ac0 Mon Sep 17 00:00:00 2001
From: Tanguy Pruvot <tanguy.pruvot@gmail.com>
Date: Sun, 30 Oct 2011 16:30:37 +0100
Subject: [PATCH 1/2] 4.5.2-51

---
drivers/media/video/isp/isp.c | 1 -
drivers/serial/omap-serial.c | 2 +-
kernel/power/wakelock.c | 1 +
3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/isp/isp.c b/drivers/media/video/isp/isp.c
index bc41bef..18a897b 100755
--- a/drivers/media/video/isp/isp.c
+++ b/drivers/media/video/isp/isp.c
@@ -998,7 +998,6 @@ static irqreturn_t omap34xx_isp_isr(int irq, void *_isp)
DPRINTK_ISPCTRL("%x\n", ispcsi1_irqstatus);
}

-
if (irqstatus & HS_VS) {
if (isp_obj.isp_lsc_workaround == 0 &&
CCDC_PREV_RESZ_CAPTURE(&isp_obj) &&
diff --git a/drivers/serial/omap-serial.c b/drivers/serial/omap-serial.c
index f3c6cfe..af91f3f 100644
--- a/drivers/serial/omap-serial.c
+++ b/drivers/serial/omap-serial.c
@@ -431,7 +431,7 @@ static void transmit_chars(struct uart_omap_port *up)
return;
}

-	count = up->port.fifosize / 4;
+	count = up->port.fifosize;

do {
serial_out(up, UART_TX, xmit->buf[xmit->tail]);
diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c
index ceb5abf..5efad56 100644
--- a/kernel/power/wakelock.c
+++ b/kernel/power/wakelock.c
@@ -271,6 +271,7 @@ static void suspend(struct work_struct *work)
}

entry_event_num = current_event_num;
+
if (debug_mask & DEBUG_EXIT_SUSPEND)
pr_info("suspend: enter suspend\n");
ret = pm_suspend(requested_suspend_state);
--
1.7.7

From 4539a363b4d7d7c2575afed55e4479aad25d2bbb Mon Sep 17 00:00:00 2001
From: Tanguy Pruvot <tanguy.pruvot@gmail.com>
Date: Mon, 9 Jan 2012 05:13:26 +0100
Subject: [PATCH 2/2] 4.5.2-109_DHT-22

---
arch/arm/mach-omap2/board-mapphone-usb.c | 2 +-
drivers/sim/sim_core.c | 7 ++++---
include/linux/posix_types.h | 2 +-
kernel/power/suspend.c | 4 ++++
kernel/power/wakelock.c | 2 +-
5 files changed, 11 insertions(+), 6 deletions(-)
mode change 100755 => 100644 kernel/power/suspend.c

diff --git a/arch/arm/mach-omap2/board-mapphone-usb.c b/arch/arm/mach-omap2/board-mapphone-usb.c
index a98a4fa..ad09122 100644
--- a/arch/arm/mach-omap2/board-mapphone-usb.c
+++ b/arch/arm/mach-omap2/board-mapphone-usb.c
@@ -145,7 +145,7 @@ static struct android_usb_product usb_products[] = {
.functions = usb_functions_mtp,
},
{
-	.product_id = MAPPHONE_PHONE_PORTAL_ADB_PRODUCT_ID,
+	.product_id = MAPPHONE_MTP_ADB_PRODUCT_ID,
.num_functions = ARRAY_SIZE(usb_functions_mtp_adb),
.functions = usb_functions_mtp_adb,
},
diff --git a/drivers/sim/sim_core.c b/drivers/sim/sim_core.c
index 68d6738..32ca0db 100755
--- a/drivers/sim/sim_core.c
+++ b/drivers/sim/sim_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2011 Motorola & Motorola Mobility, Inc.
+ * Copyright (C) 2005-2010 Motorola, Inc.
*/

/*
@@ -1596,8 +1596,8 @@ static void sim_module_int_reset_detect(UINT8 reader_id)
USIM_RX_EN_MASK, 0);

/* while there is data in the FIFO ... */
-	while ((read_reg(&(sim_registers[reader_id]->
-	usim_fifos)) & FIFORX_EMPTY_MASK) == 0) {
+	while (((sim_registers[reader_id]->
+	usim_fifos) & FIFORX_EMPTY_MASK) == 0) {
/* copy the character into the data buffer */
sim_module_card_data[reader_id].
buffer[sim_module_card_data[reader_id].buffer_index++]
@@ -2691,6 +2691,7 @@ static int start_clk_stop_procedure(UINT8 reader_id, UINT32 clock_count)
/* clear the Clock Stop Interrupt */
write_reg_bits(&(sim_registers[reader_id]->irqstatus),
USIM_STOP_CLK_MASK, 0);
+ msleep(5);
} else{
tracemsg("%s%s",
"Warning: Invalid reader ID passed ",
diff --git a/include/linux/posix_types.h b/include/linux/posix_types.h
index f04c98c..fc9469f 100644
--- a/include/linux/posix_types.h
+++ b/include/linux/posix_types.h
@@ -22,7 +22,7 @@
#define __NFDBITS	(8 * sizeof(unsigned long))

#undef __FD_SETSIZE
-#define __FD_SETSIZE	1024
+#define __FD_SETSIZE	2048

#undef __FDSET_LONGS
#define __FDSET_LONGS	(__FD_SETSIZE/__NFDBITS)
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
old mode 100755
new mode 100644
index 2823ff7..642f79d
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -285,6 +285,10 @@ int enter_state(suspend_state_t state)
if (!mutex_trylock(&pm_mutex))
return -EBUSY;

+	printk(KERN_INFO "PM: Syncing filesystems ... ");
+	sys_sync();
+	printk("done.\n");
+
pr_debug("PM: Preparing system for %s sleep\n", pm_states[state]);
error = suspend_prepare();
if (error)
diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c
index 5efad56..4d28d80 100644
--- a/kernel/power/wakelock.c
+++ b/kernel/power/wakelock.c
@@ -271,7 +271,7 @@ static void suspend(struct work_struct *work)
}

entry_event_num = current_event_num;
-
+	sys_sync();
if (debug_mask & DEBUG_EXIT_SUSPEND)
pr_info("suspend: enter suspend\n");
ret = pm_suspend(requested_suspend_state);
--
1.7.7