[Galaxy 3 Android Development] cdesai:
Difference in /drivers/char folder

Only in g3/drivers/char: dcc_tty.c
diff -crB linux/drivers/char/Kconfig g3/drivers/char/Kconfig
*** linux/drivers/char/Kconfig	2010-02-23 07:38:51.000000000 -0800
--- g3/drivers/char/Kconfig	2011-02-26 04:41:38.000000000 -0800
***************
*** 88,93 ****
--- 88,106 ----
information. For framebuffer console users, please refer to
<file:Documentation/fb/fbcon.txt>.

+ config DEVMEM
+	bool "Memory device driver"
+	default y
+	help
+	The memory driver provides two character devices, mem and kmem, which
+	provide access to the system's memory. The mem device is a view of
+	physical memory, and each byte in the device corresponds to the
+	matching physical address. The kmem device is the same as mem, but
+	the addresses correspond to the kernel's virtual address space rather
+	than physical memory. These devices are standard parts of a Linux
+	system and most users should say Y here. You might say N if very
+	security conscience or memory is tight.
+
config DEVKMEM
bool "/dev/kmem virtual device support"
default y
***************
*** 1116,1121 ****
--- 1129,1138 ----
depends on ISA || PCI
default y

+ config DCC_TTY
+	tristate "DCC tty driver"
+	depends on ARM
+
source "drivers/s390/char/Kconfig"

endmenu
diff -crB linux/drivers/char/Makefile g3/drivers/char/Makefile
*** linux/drivers/char/Makefile	2010-02-23 07:38:51.000000000 -0800
--- g3/drivers/char/Makefile	2011-02-26 04:41:38.000000000 -0800
***************
*** 107,112 ****
--- 107,113 ----
obj-$(CONFIG_HANGCHECK_TIMER)	+= hangcheck-timer.o
obj-$(CONFIG_TCG_TPM)	+= tpm/

+ obj-$(CONFIG_DCC_TTY)	+= dcc_tty.o
obj-$(CONFIG_PS3_FLASH)	+= ps3flash.o

obj-$(CONFIG_JS_RTC)	+= js-rtc.o
diff -crB linux/drivers/char/mem.c g3/drivers/char/mem.c
*** linux/drivers/char/mem.c	2010-02-23 07:38:51.000000000 -0800
--- g3/drivers/char/mem.c	2011-02-26 04:41:38.000000000 -0800
***************
*** 93,98 ****
--- 93,99 ----
}
#endif

+ #if defined(CONFIG_DEVMEM) || defined(CONFIG_DEVKMEM)
#ifdef CONFIG_STRICT_DEVMEM
static inline int range_is_allowed(unsigned long pfn, unsigned long size)
{
***************
*** 118,124 ****
--- 119,127 ----
return 1;
}
#endif
+ #endif

+ #ifdef CONFIG_DEVMEM
void __attribute__((weak)) unxlate_dev_mem_ptr(unsigned long phys, void *addr)
{
}
***************
*** 267,272 ****
--- 270,278 ----
*ppos += written;
return written;
}
+ #endif	/* CONFIG_DEVMEM */
+
+ #if defined(CONFIG_DEVMEM) || defined(CONFIG_DEVKMEM)

int __attribute__((weak)) phys_mem_access_prot_allowed(struct file *file,
unsigned long pfn, unsigned long size, pgprot_t *vma_prot)
***************
*** 353,358 ****
--- 359,365 ----
}
return 0;
}
+ #endif	/* CONFIG_DEVMEM */

#ifdef CONFIG_DEVKMEM
static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
***************
*** 732,737 ****
--- 739,746 ----
return file->f_pos = 0;
}

+ #if defined(CONFIG_DEVMEM) || defined(CONFIG_DEVKMEM) || defined(CONFIG_DEVPORT)
+
/*
* The memory devices use the full 32/64 bits of the offset, and so we cannot
* check against negative addresses: they are ok. The return value is weird,
***************
*** 763,772 ****
return ret;
}

static int open_port(struct inode * inode, struct file * filp)
{
!	return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
}

#define zero_lseek	null_lseek
#define full_lseek null_lseek
--- 772,786 ----
return ret;
}

+ #endif
+
+ #if defined(CONFIG_DEVMEM) || defined(CONFIG_DEVKMEM) || defined(CONFIG_DEVPORT)
static int open_port(struct inode * inode, struct file * filp)
{
! //	return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
! return 0;
}
+ #endif

#define zero_lseek	null_lseek
#define full_lseek null_lseek
***************
*** 776,781 ****
--- 790,796 ----
#define open_kmem	open_mem
#define open_oldmem	open_mem

+ #ifdef CONFIG_DEVMEM
static const struct file_operations mem_fops = {
.llseek	= memory_lseek,
.read	= read_mem,
***************
*** 784,789 ****
--- 799,805 ----
.open	= open_mem,
.get_unmapped_area = get_unmapped_area_mem,
};
+ #endif

#ifdef CONFIG_DEVKMEM
static const struct file_operations kmem_fops = {
***************
*** 872,878 ****
--- 888,896 ----
const struct file_operations *fops;
struct backing_dev_info *dev_info;
} devlist[] = {
+ #ifdef CONFIG_DEVMEM
[1] = { "mem", 0, &mem_fops, &directly_mappable_cdev_bdi },
+ #endif
#ifdef CONFIG_DEVKMEM
[2] = { "kmem", 0, &kmem_fops, &directly_mappable_cdev_bdi },
#endif