diff --git a/[refs] b/[refs]
index 7e09d9dc4a32..a40371f65202 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: 641e22e04c48af5d813f119c55336e02a22756f5
+refs/heads/master: 26b8e51e98ae09cfc770b918577c004a376de4b8
diff --git a/trunk/Documentation/DocBook/gadget.tmpl b/trunk/Documentation/DocBook/gadget.tmpl
index 6996d977bf8f..e7fc96433408 100644
--- a/trunk/Documentation/DocBook/gadget.tmpl
+++ b/trunk/Documentation/DocBook/gadget.tmpl
@@ -52,7 +52,7 @@
-Introduction
+Introduction
This document presents a Linux-USB "Gadget"
kernel mode
diff --git a/trunk/Documentation/DocBook/usb.tmpl b/trunk/Documentation/DocBook/usb.tmpl
index af293606fbe3..a2ebd651b05a 100644
--- a/trunk/Documentation/DocBook/usb.tmpl
+++ b/trunk/Documentation/DocBook/usb.tmpl
@@ -185,7 +185,7 @@
-USB-Standard Types
+USB-Standard Types
In <linux/usb/ch9.h> you will find
the USB data types defined in chapter 9 of the USB specification.
@@ -197,7 +197,7 @@
-Host-Side Data Types and Macros
+Host-Side Data Types and Macros
The host side API exposes several layers to drivers, some of
which are more necessary than others.
@@ -211,7 +211,7 @@
- USB Core APIs
+ USB Core APIs
There are two basic I/O models in the USB API.
The most elemental one is asynchronous: drivers submit requests
@@ -248,7 +248,7 @@
!Edrivers/usb/core/hub.c
- Host Controller APIs
+ Host Controller APIs
These APIs are only for use by host controller drivers,
most of which implement standard register interfaces such as
@@ -285,7 +285,7 @@
!Idrivers/usb/core/buffer.c
-
+
The USB Filesystem (usbfs)
This chapter presents the Linux usbfs.
@@ -317,7 +317,7 @@
not it has a kernel driver.
-
+
What files are in "usbfs"?
Conventionally mounted at
@@ -356,7 +356,7 @@
-
+
Mounting and Access Control
There are a number of mount options for usbfs, which will
@@ -439,7 +439,7 @@
-
+
/proc/bus/usb/devices
This file is handy for status viewing tools in user
@@ -473,7 +473,7 @@ for (;;) {
-
+
/proc/bus/usb/BBB/DDD
Use these files in one of these basic ways:
@@ -510,7 +510,7 @@ for (;;) {
-
+
Life Cycle of User Mode Drivers
Such a driver first needs to find a device file
@@ -565,7 +565,7 @@ for (;;) {
- The ioctl() Requests
+ The ioctl() Requests
To use these ioctls, you need to include the following
headers in your userspace program:
@@ -604,7 +604,7 @@ for (;;) {
-
+
Management/Status Requests
A number of usbfs requests don't deal very directly
@@ -736,7 +736,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
-
+
Synchronous I/O Support
Synchronous requests involve the kernel blocking
@@ -865,7 +865,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
-
+
Asynchronous I/O Support
As mentioned above, there are situations where it may be
diff --git a/trunk/arch/ia64/kernel/process.c b/trunk/arch/ia64/kernel/process.c
index af73b8dfde28..d1c3ed9943e5 100644
--- a/trunk/arch/ia64/kernel/process.c
+++ b/trunk/arch/ia64/kernel/process.c
@@ -763,9 +763,6 @@ get_wchan (struct task_struct *p)
unsigned long ip;
int count = 0;
- if (!p || p == current || p->state == TASK_RUNNING)
- return 0;
-
/*
* Note: p may not be a blocked task (it could be current or
* another process running on some other CPU. Rather than
@@ -776,8 +773,6 @@ get_wchan (struct task_struct *p)
*/
unw_init_from_blocked_task(&info, p);
do {
- if (p->state == TASK_RUNNING)
- return 0;
if (unw_unwind(&info) < 0)
return 0;
unw_get_ip(&info, &ip);
diff --git a/trunk/arch/ia64/kernel/unwind.c b/trunk/arch/ia64/kernel/unwind.c
index b0b08b5f3eca..7d3dd6cdafa4 100644
--- a/trunk/arch/ia64/kernel/unwind.c
+++ b/trunk/arch/ia64/kernel/unwind.c
@@ -1860,7 +1860,7 @@ int
unw_unwind (struct unw_frame_info *info)
{
unsigned long prev_ip, prev_sp, prev_bsp;
- unsigned long ip, pr, num_regs, rp_loc, pfs_loc;
+ unsigned long ip, pr, num_regs;
STAT(unsigned long start, flags;)
int retval;
@@ -1870,16 +1870,14 @@ unw_unwind (struct unw_frame_info *info)
prev_sp = info->sp;
prev_bsp = info->bsp;
- /* validate the return IP pointer */
- rp_loc = (unsigned long) info->rp_loc;
- if ((rp_loc < info->regstk.limit) || (rp_loc > info->regstk.top)) {
+ /* restore the ip */
+ if (!info->rp_loc) {
/* FIXME: should really be level 0 but it occurs too often. KAO */
UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n",
__FUNCTION__, info->ip);
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
return -1;
}
- /* restore the ip */
ip = info->ip = *info->rp_loc;
if (ip < GATE_ADDR) {
UNW_DPRINT(2, "unwind.%s: reached user-space (ip=0x%lx)\n", __FUNCTION__, ip);
@@ -1887,14 +1885,12 @@ unw_unwind (struct unw_frame_info *info)
return -1;
}
- /* validate the previous stack frame pointer */
- pfs_loc = (unsigned long) info->pfs_loc;
- if ((pfs_loc < info->regstk.limit) || (pfs_loc > info->regstk.top)) {
+ /* restore the cfm: */
+ if (!info->pfs_loc) {
UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__);
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
return -1;
}
- /* restore the cfm: */
info->cfm_loc = info->pfs_loc;
/* restore the bsp: */
@@ -1996,16 +1992,13 @@ init_frame_info (struct unw_frame_info *info, struct task_struct *t,
memset(info, 0, sizeof(*info));
rbslimit = (unsigned long) t + IA64_RBS_OFFSET;
- stklimit = (unsigned long) t + IA64_STK_OFFSET;
-
rbstop = sw->ar_bspstore;
- if (rbstop > stklimit || rbstop < rbslimit)
+ if (rbstop - (unsigned long) t >= IA64_STK_OFFSET)
rbstop = rbslimit;
+ stklimit = (unsigned long) t + IA64_STK_OFFSET;
if (stktop <= rbstop)
stktop = rbstop;
- if (stktop > stklimit)
- stktop = stklimit;
info->regstk.limit = rbslimit;
info->regstk.top = rbstop;
diff --git a/trunk/arch/ia64/pci/pci.c b/trunk/arch/ia64/pci/pci.c
index 73696b4a2eed..3549f3b42592 100644
--- a/trunk/arch/ia64/pci/pci.c
+++ b/trunk/arch/ia64/pci/pci.c
@@ -354,13 +354,10 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus)
acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window,
&windows);
- if (windows) {
- controller->window =
- kmalloc_node(sizeof(*controller->window) * windows,
- GFP_KERNEL, controller->node);
- if (!controller->window)
- goto out2;
- }
+ controller->window = kmalloc_node(sizeof(*controller->window) * windows,
+ GFP_KERNEL, controller->node);
+ if (!controller->window)
+ goto out2;
name = kmalloc(16, GFP_KERNEL);
if (!name)
diff --git a/trunk/arch/ia64/sn/kernel/setup.c b/trunk/arch/ia64/sn/kernel/setup.c
index 684b1c984a44..a574fcd163dd 100644
--- a/trunk/arch/ia64/sn/kernel/setup.c
+++ b/trunk/arch/ia64/sn/kernel/setup.c
@@ -194,7 +194,7 @@ void __init early_sn_setup(void)
}
extern int platform_intr_list[];
-static int __cpuinitdata shub_1_1_found;
+static int __initdata shub_1_1_found;
/*
* sn_check_for_wars
diff --git a/trunk/arch/powerpc/kernel/cputable.c b/trunk/arch/powerpc/kernel/cputable.c
index b2b5d664d328..6ef87fb90b8e 100644
--- a/trunk/arch/powerpc/kernel/cputable.c
+++ b/trunk/arch/powerpc/kernel/cputable.c
@@ -235,7 +235,6 @@ static struct cpu_spec cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .pmc_type = PPC_PMC_IBM,
.cpu_setup = __setup_cpu_ppc970,
.cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970MP",
@@ -252,7 +251,6 @@ static struct cpu_spec cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 8,
- .pmc_type = PPC_PMC_IBM,
.cpu_setup = __setup_cpu_ppc970MP,
.cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970MP",
@@ -319,7 +317,6 @@ static struct cpu_spec cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power6",
.oprofile_type = PPC_OPROFILE_POWER4,
.oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
@@ -338,7 +335,6 @@ static struct cpu_spec cpu_specs[] = {
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
- .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power6",
.oprofile_type = PPC_OPROFILE_POWER4,
.oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
diff --git a/trunk/arch/powerpc/kernel/pmc.c b/trunk/arch/powerpc/kernel/pmc.c
index ea04e0ab3f2f..24d7b7c99bb9 100644
--- a/trunk/arch/powerpc/kernel/pmc.c
+++ b/trunk/arch/powerpc/kernel/pmc.c
@@ -20,8 +20,8 @@
#include
#include
-#ifndef MMCR0_PMAO
-#define MMCR0_PMAO 0
+#ifndef MMCR0_PMA0
+#define MMCR0_PMA0 0
#endif
static void dummy_perf(struct pt_regs *regs)
@@ -30,7 +30,7 @@ static void dummy_perf(struct pt_regs *regs)
mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE);
#elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
if (cur_cpu_spec->pmc_type == PPC_PMC_IBM)
- mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMAO));
+ mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMA0));
#else
mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE);
#endif
diff --git a/trunk/arch/powerpc/kernel/smp.c b/trunk/arch/powerpc/kernel/smp.c
index d577b71db375..22f1ef1b3100 100644
--- a/trunk/arch/powerpc/kernel/smp.c
+++ b/trunk/arch/powerpc/kernel/smp.c
@@ -201,6 +201,13 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
/* Can deadlock when called with interrupts disabled */
WARN_ON(irqs_disabled());
+ /* remove 'self' from the map */
+ if (cpu_isset(smp_processor_id(), map))
+ cpu_clear(smp_processor_id(), map);
+
+ /* sanity check the map, remove any non-online processors. */
+ cpus_and(map, map, cpu_online_map);
+
if (unlikely(smp_ops == NULL))
return ret;
@@ -215,17 +222,10 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
/* Must grab online cpu count with preempt disabled, otherwise
* it can change. */
num_cpus = num_online_cpus() - 1;
- if (!num_cpus)
- goto done;
-
- /* remove 'self' from the map */
- if (cpu_isset(smp_processor_id(), map))
- cpu_clear(smp_processor_id(), map);
-
- /* sanity check the map, remove any non-online processors. */
- cpus_and(map, map, cpu_online_map);
- if (cpus_empty(map))
- goto done;
+ if (!num_cpus || cpus_empty(map)) {
+ ret = 0;
+ goto out;
+ }
call_data = &data;
smp_wmb();
@@ -263,7 +263,6 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
}
}
- done:
ret = 0;
out:
@@ -283,17 +282,16 @@ EXPORT_SYMBOL(smp_call_function);
int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int nonatomic,
int wait)
{
- cpumask_t map = CPU_MASK_NONE;
- int ret = -EBUSY;
+ cpumask_t map=CPU_MASK_NONE;
if (!cpu_online(cpu))
return -EINVAL;
+ if (cpu == smp_processor_id())
+ return -EBUSY;
+
cpu_set(cpu, map);
- if (cpu != get_cpu())
- ret = smp_call_function_map(func,info,nonatomic,wait,map);
- put_cpu();
- return ret;
+ return smp_call_function_map(func,info,nonatomic,wait,map);
}
EXPORT_SYMBOL(smp_call_function_single);
diff --git a/trunk/arch/powerpc/kernel/vmlinux.lds.S b/trunk/arch/powerpc/kernel/vmlinux.lds.S
index 21c39ff2dc39..f7d7bf19e4fb 100644
--- a/trunk/arch/powerpc/kernel/vmlinux.lds.S
+++ b/trunk/arch/powerpc/kernel/vmlinux.lds.S
@@ -34,6 +34,7 @@ SECTIONS
/* Text and gots */
.text : {
_text = .;
+ *(.text.*)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
diff --git a/trunk/arch/powerpc/mm/mem.c b/trunk/arch/powerpc/mm/mem.c
index 0266a94d83b6..246eeea40ece 100644
--- a/trunk/arch/powerpc/mm/mem.c
+++ b/trunk/arch/powerpc/mm/mem.c
@@ -310,12 +310,11 @@ void __init paging_init(void)
#ifdef CONFIG_HIGHMEM
map_page(PKMAP_BASE, 0, 0); /* XXX gross */
- pkmap_page_table = pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k
- (PKMAP_BASE), PKMAP_BASE), PKMAP_BASE), PKMAP_BASE);
+ pkmap_page_table = pte_offset_kernel(pmd_offset(pgd_offset_k
+ (PKMAP_BASE), PKMAP_BASE), PKMAP_BASE);
map_page(KMAP_FIX_BEGIN, 0, 0); /* XXX gross */
- kmap_pte = pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k
- (KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN),
- KMAP_FIX_BEGIN);
+ kmap_pte = pte_offset_kernel(pmd_offset(pgd_offset_k
+ (KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN);
kmap_prot = PAGE_KERNEL;
#endif /* CONFIG_HIGHMEM */
diff --git a/trunk/arch/sh/boards/landisk/gio.c b/trunk/arch/sh/boards/landisk/gio.c
index a37643d002b2..50d38be62f01 100644
--- a/trunk/arch/sh/boards/landisk/gio.c
+++ b/trunk/arch/sh/boards/landisk/gio.c
@@ -69,7 +69,7 @@ static int gio_ioctl(struct inode *inode, struct file *filp,
}
switch (cmd) {
- case GIODRV_IOCSGIOSETADDR: /* address set */
+ case GIODRV_IOCSGIOSETADDR: /* addres set */
addr = data;
break;
diff --git a/trunk/arch/sh/boards/landisk/setup.c b/trunk/arch/sh/boards/landisk/setup.c
index f953c7427769..4058b4f50d44 100644
--- a/trunk/arch/sh/boards/landisk/setup.c
+++ b/trunk/arch/sh/boards/landisk/setup.c
@@ -44,14 +44,8 @@ static struct platform_device cf_ide_device = {
},
};
-static struct platform_device rtc_device = {
- .name = "rs5c313",
- .id = -1,
-};
-
static struct platform_device *landisk_devices[] __initdata = {
&cf_ide_device,
- &rtc_device,
};
static int __init landisk_devices_setup(void)
diff --git a/trunk/arch/sh/boards/renesas/r7780rp/Makefile b/trunk/arch/sh/boards/renesas/r7780rp/Makefile
index b1d20afb4eb3..609e5d50dde8 100644
--- a/trunk/arch/sh/boards/renesas/r7780rp/Makefile
+++ b/trunk/arch/sh/boards/renesas/r7780rp/Makefile
@@ -3,8 +3,5 @@
#
irqinit-y := irq-r7780rp.o
irqinit-$(CONFIG_SH_R7785RP) := irq-r7785rp.o
-obj-y := setup.o irq.o $(irqinit-y)
-
-ifneq ($(CONFIG_SH_R7785RP),y)
obj-$(CONFIG_PUSH_SWITCH) += psw.o
-endif
+obj-y := setup.o irq.o $(irqinit-y)
diff --git a/trunk/arch/sh/boards/snapgear/rtc.c b/trunk/arch/sh/boards/snapgear/rtc.c
index edb3dd936cbb..1659fdd6695a 100644
--- a/trunk/arch/sh/boards/snapgear/rtc.c
+++ b/trunk/arch/sh/boards/snapgear/rtc.c
@@ -108,7 +108,7 @@ static void ds1302_writebyte(unsigned int addr, unsigned int val)
static void ds1302_reset(void)
{
unsigned long flags;
- /* Hardware dependent reset/init */
+ /* Hardware dependant reset/init */
local_irq_save(flags);
set_dirp(get_dirp() | RTC_RESET | RTC_IODATA | RTC_SCLK);
set_dp(get_dp() & ~(RTC_RESET | RTC_IODATA | RTC_SCLK));
diff --git a/trunk/arch/sh/boards/superh/microdev/io.c b/trunk/arch/sh/boards/superh/microdev/io.c
index b704e20d7e4d..83419bf4c834 100644
--- a/trunk/arch/sh/boards/superh/microdev/io.c
+++ b/trunk/arch/sh/boards/superh/microdev/io.c
@@ -198,12 +198,12 @@ void microdev_outb(unsigned char b, unsigned long port)
/*
* There is a board feature with the current SH4-202 MicroDev in
* that the 2 byte enables (nBE0 and nBE1) are tied together (and
- * to the Chip Select Line (Ethernet_CS)). Due to this connectivity,
+ * to the Chip Select Line (Ethernet_CS)). Due to this conectivity,
* it is not possible to safely perform 8-bit writes to the
* Ethernet registers, as 16-bits will be consumed from the Data
* lines (corrupting the other byte). Hence, this function is
- * written to implement 16-bit read/modify/write for all byte-wide
- * accesses.
+ * written to impliment 16-bit read/modify/write for all byte-wide
+ * acceses.
*
* Note: there is no problem with byte READS (even or odd).
*
diff --git a/trunk/arch/sh/boards/superh/microdev/irq.c b/trunk/arch/sh/boards/superh/microdev/irq.c
index cc1cb04fa618..8c64baa30364 100644
--- a/trunk/arch/sh/boards/superh/microdev/irq.c
+++ b/trunk/arch/sh/boards/superh/microdev/irq.c
@@ -100,7 +100,7 @@ static void disable_microdev_irq(unsigned int irq)
fpgaIrq = fpgaIrqTable[irq].fpgaIrq;
- /* disable interrupts on the FPGA INTC register */
+ /* disable interupts on the FPGA INTC register */
ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG);
}
@@ -125,7 +125,7 @@ static void enable_microdev_irq(unsigned int irq)
priorities |= MICRODEV_FPGA_INTPRI_LEVEL(fpgaIrq, pri);
ctrl_outl(priorities, priorityReg);
- /* enable interrupts on the FPGA INTC register */
+ /* enable interupts on the FPGA INTC register */
ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG);
}
@@ -152,7 +152,7 @@ extern void __init init_microdev_irq(void)
{
int i;
- /* disable interrupts on the FPGA INTC register */
+ /* disable interupts on the FPGA INTC register */
ctrl_outl(~0ul, MICRODEV_FPGA_INTDSB_REG);
for (i = 0; i < NUM_EXTERNAL_IRQS; i++)
diff --git a/trunk/arch/sh/boards/superh/microdev/setup.c b/trunk/arch/sh/boards/superh/microdev/setup.c
index 6396cea1c896..031c814e6e76 100644
--- a/trunk/arch/sh/boards/superh/microdev/setup.c
+++ b/trunk/arch/sh/boards/superh/microdev/setup.c
@@ -349,7 +349,7 @@ static int __init smsc_superio_setup(void)
SMSC_WRITE_INDEXED(0x00, 0xc7); /* GP47 = nIOWOP */
SMSC_WRITE_INDEXED(0x08, 0xe8); /* GP20 = nIDE2_OE */
- /* Exit the configuration state */
+ /* Exit the configuraton state */
outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR);
return 0;
diff --git a/trunk/arch/sh/boards/unknown/setup.c b/trunk/arch/sh/boards/unknown/setup.c
index bee4612de59b..1c941370a2e3 100644
--- a/trunk/arch/sh/boards/unknown/setup.c
+++ b/trunk/arch/sh/boards/unknown/setup.c
@@ -6,7 +6,7 @@
* May be copied or modified under the terms of the GNU General Public
* License. See linux/COPYING for more information.
*
- * Setup code for an unknown machine (internal peripherals only)
+ * Setup code for an unknown machine (internal peripherials only)
*
* This is the simplest of all boards, and serves only as a quick and dirty
* method to start debugging a new board during bring-up until proper board
diff --git a/trunk/arch/sh/drivers/dma/dma-api.c b/trunk/arch/sh/drivers/dma/dma-api.c
index 8057a27a1bc6..e062067edd24 100644
--- a/trunk/arch/sh/drivers/dma/dma-api.c
+++ b/trunk/arch/sh/drivers/dma/dma-api.c
@@ -115,7 +115,7 @@ static int search_cap(const char **haystack, const char *needle)
/**
* request_dma_bycap - Allocate a DMA channel based on its capabilities
* @dmac: List of DMA controllers to search
- * @caps: List of capabilities
+ * @caps: List of capabilites
*
* Search all channels of all DMA controllers to find a channel which
* matches the requested capabilities. The result is the channel
diff --git a/trunk/arch/sh/drivers/dma/dma-isa.c b/trunk/arch/sh/drivers/dma/dma-isa.c
index 5fb044b791c3..05a74ffdb68d 100644
--- a/trunk/arch/sh/drivers/dma/dma-isa.c
+++ b/trunk/arch/sh/drivers/dma/dma-isa.c
@@ -28,7 +28,7 @@
* NOTE: ops->xfer() is the preferred way of doing things. However, there
* are some users of the ISA DMA API that exist in common code that we
* don't necessarily want to go out of our way to break, so we still
- * allow for some compatibility at that level. Any new code is strongly
+ * allow for some compatability at that level. Any new code is strongly
* advised to run far away from the ISA DMA API and use the SH DMA API
* directly.
*/
diff --git a/trunk/arch/sh/drivers/dma/dmabrg.c b/trunk/arch/sh/drivers/dma/dmabrg.c
index 5e22689c2fcf..9d0a29370f21 100644
--- a/trunk/arch/sh/drivers/dma/dmabrg.c
+++ b/trunk/arch/sh/drivers/dma/dmabrg.c
@@ -33,7 +33,7 @@
* 9 | HAC1/SSI1 | rec | half done | DMABRGI2
*
* all can be enabled/disabled in the DMABRGCR register,
- * as well as checked if they occurred.
+ * as well as checked if they occured.
*
* DMABRGI0 services USB DMA Address errors, but it still must be
* enabled/acked in the DMABRGCR register. USB-DMA complete indicator
diff --git a/trunk/arch/sh/drivers/pci/ops-dreamcast.c b/trunk/arch/sh/drivers/pci/ops-dreamcast.c
index e1284fc69361..381306cf5425 100644
--- a/trunk/arch/sh/drivers/pci/ops-dreamcast.c
+++ b/trunk/arch/sh/drivers/pci/ops-dreamcast.c
@@ -57,7 +57,7 @@ struct pci_channel board_pci_channels[] = {
*
* Also, we could very easily support both Type 0 and Type 1 configurations
* here, but since it doesn't seem that there is any such implementation in
- * existence, we don't bother.
+ * existance, we don't bother.
*
* I suppose if someone actually gets around to ripping the chip out of
* the BBA and hanging some more devices off of it, then this might be
diff --git a/trunk/arch/sh/drivers/pci/pci-st40.c b/trunk/arch/sh/drivers/pci/pci-st40.c
index 543417ff8314..d67656a44b15 100644
--- a/trunk/arch/sh/drivers/pci/pci-st40.c
+++ b/trunk/arch/sh/drivers/pci/pci-st40.c
@@ -292,7 +292,7 @@ int __init st40pci_init(unsigned memStart, unsigned memSize)
PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
PCI_COMMAND_IO);
- /* Access to the 0xb0000000 -> 0xb6000000 area will go through to 0x10000000 -> 0x16000000
+ /* Accesse to the 0xb0000000 -> 0xb6000000 area will go through to 0x10000000 -> 0x16000000
* on the PCI bus. This allows a nice 1-1 bus to phys mapping.
*/
@@ -315,7 +315,7 @@ int __init st40pci_init(unsigned memStart, unsigned memSize)
ST40PCI_WRITE(CSR_MBAR0, 0);
ST40PCI_WRITE(LSR0, 0x0fff0001);
- /* ... and set up the initial incoming window to expose all of RAM */
+ /* ... and set up the initial incomming window to expose all of RAM */
pci_set_rbar_region(7, memStart, memStart, memSize);
/* Maximise timeout values */
@@ -473,7 +473,7 @@ static void pci_set_rbar_region(unsigned int region, unsigned long localAddr
mask = r2p2(regionSize) - 0x10000;
- /* Disable the region (in case currently in use, should never happen) */
+ /* Diable the region (in case currently in use, should never happen) */
ST40PCI_WRITE_INDEXED(RSR, region, 0);
/* Start of local address space to publish */
diff --git a/trunk/arch/sh/drivers/pci/pci-st40.h b/trunk/arch/sh/drivers/pci/pci-st40.h
index cf0d35bd135c..d729e0c2d5fe 100644
--- a/trunk/arch/sh/drivers/pci/pci-st40.h
+++ b/trunk/arch/sh/drivers/pci/pci-st40.h
@@ -4,7 +4,7 @@
* May be copied or modified under the terms of the GNU General Public
* License. See linux/COPYING for more information.
*
- * Definitions for the ST40 PCI hardware.
+ * Defintions for the ST40 PCI hardware.
*/
#ifndef __PCI_ST40_H__
diff --git a/trunk/arch/sh/drivers/superhyway/ops-sh4-202.c b/trunk/arch/sh/drivers/superhyway/ops-sh4-202.c
index 3b14bf860db6..a55c98a9052b 100644
--- a/trunk/arch/sh/drivers/superhyway/ops-sh4-202.c
+++ b/trunk/arch/sh/drivers/superhyway/ops-sh4-202.c
@@ -130,7 +130,7 @@ static int sh4202_read_vcr(unsigned long base, struct superhyway_vcr_info *vcr)
* Some modules (PBR and ePBR for instance) also appear to have
* VCRL/VCRH flipped in the documentation, but on the SH4-202
* itself it appears that these are all consistently mapped with
- * VCRH preceding VCRL.
+ * VCRH preceeding VCRL.
*
* Do not trust the documentation, for it is evil.
*/
diff --git a/trunk/arch/sh/kernel/cf-enabler.c b/trunk/arch/sh/kernel/cf-enabler.c
index 849a9e191391..0758d48147a0 100644
--- a/trunk/arch/sh/kernel/cf-enabler.c
+++ b/trunk/arch/sh/kernel/cf-enabler.c
@@ -31,7 +31,7 @@
*/
#if defined(CONFIG_CPU_SH4)
/* SH4 can't access PCMCIA interface through P2 area.
- * we must remap it with appropriate attribute bit of the page set.
+ * we must remap it with appropreate attribute bit of the page set.
* this part is based on Greg Banks' hd64465_ss.c implementation - Masahiro Abe */
#if defined(CONFIG_CF_AREA6)
diff --git a/trunk/arch/sh/kernel/cpu/clock.c b/trunk/arch/sh/kernel/cpu/clock.c
index 63251549e9a8..014f318f5a05 100644
--- a/trunk/arch/sh/kernel/cpu/clock.c
+++ b/trunk/arch/sh/kernel/cpu/clock.c
@@ -278,11 +278,6 @@ arch_init_clk_ops(struct clk_ops **ops, int type)
{
}
-void __init __attribute__ ((weak))
-arch_clk_init(void)
-{
-}
-
static int show_clocks(char *buf, char **start, off_t off,
int len, int *eof, void *data)
{
@@ -319,8 +314,6 @@ int __init clk_init(void)
ret |= clk_register(clk);
}
- arch_clk_init();
-
/* Kick the child clocks.. */
propagate_rate(&master_clk);
propagate_rate(&bus_clk);
diff --git a/trunk/arch/sh/kernel/cpu/irq/maskreg.c b/trunk/arch/sh/kernel/cpu/irq/maskreg.c
index 978992e367a5..492db31b3cab 100644
--- a/trunk/arch/sh/kernel/cpu/irq/maskreg.c
+++ b/trunk/arch/sh/kernel/cpu/irq/maskreg.c
@@ -38,7 +38,7 @@ static struct hw_interrupt_type maskreg_irq_type = {
.end = end_maskreg_irq
};
-/* actual implementation */
+/* actual implementatin */
static unsigned int startup_maskreg_irq(unsigned int irq)
{
enable_maskreg_irq(irq);
diff --git a/trunk/arch/sh/kernel/cpu/sh4/fpu.c b/trunk/arch/sh/kernel/cpu/sh4/fpu.c
index c5a4fc77fa06..d61dd599169f 100644
--- a/trunk/arch/sh/kernel/cpu/sh4/fpu.c
+++ b/trunk/arch/sh/kernel/cpu/sh4/fpu.c
@@ -138,7 +138,7 @@ restore_fpu(struct task_struct *tsk)
/*
* Load the FPU with signalling NANS. This bit pattern we're using
* has the property that no matter wether considered as single or as
- * double precision represents signaling NANS.
+ * double precission represents signaling NANS.
*/
static void
diff --git a/trunk/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/trunk/arch/sh/kernel/cpu/sh4/setup-sh7750.c
index 03b14cf78ddf..6f8f458912c7 100644
--- a/trunk/arch/sh/kernel/cpu/sh4/setup-sh7750.c
+++ b/trunk/arch/sh/kernel/cpu/sh4/setup-sh7750.c
@@ -106,7 +106,6 @@ static struct ipr_data sh7750_ipr_map[] = {
{ 38, 2, 8, 7 }, /* DMAC DMAE */
};
-#ifdef CONFIG_CPU_SUBTYPE_SH7751
static struct ipr_data sh7751_ipr_map[] = {
{ 44, 2, 8, 7 }, /* DMAC DMTE4 */
{ 45, 2, 8, 7 }, /* DMAC DMTE5 */
@@ -118,7 +117,6 @@ static struct ipr_data sh7751_ipr_map[] = {
/*{ 72, INTPRI00, 8, ? },*/ /* TMU3 TUNI */
/*{ 76, INTPRI00, 12, ? },*/ /* TMU4 TUNI */
};
-#endif
static unsigned long ipr_offsets[] = {
0xffd00004UL, /* 0: IPRA */
diff --git a/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
index 51b386d454de..29090035bc5b 100644
--- a/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
+++ b/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
@@ -17,6 +17,7 @@
#include
#include
+#define SH7722_PLL_FREQ (32000000/8)
#define N (-1)
#define NM (-2)
#define ROUND_NEAREST 0
@@ -140,36 +141,28 @@ static void adjust_clocks(int originate, int *l, unsigned long v[],
*/
static int divisors2[] = { 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40 };
-static void master_clk_recalc(struct clk *clk)
-{
- unsigned frqcr = ctrl_inl(FRQCR);
-
- clk->rate = CONFIG_SH_PCLK_FREQ * (((frqcr >> 24) & 0x1f) + 1);
-}
-
static void master_clk_init(struct clk *clk)
{
- clk->parent = NULL;
- clk->flags |= CLK_RATE_PROPAGATES;
- clk->rate = CONFIG_SH_PCLK_FREQ;
- master_clk_recalc(clk);
+ clk_set_rate(clk, clk_get_rate(clk));
}
-
-static void module_clk_recalc(struct clk *clk)
+static void master_clk_recalc(struct clk *clk)
{
unsigned long frqcr = ctrl_inl(FRQCR);
- clk->rate = clk->parent->rate / (((frqcr >> 24) & 0x1f) + 1);
+ clk->rate = CONFIG_SH_PCLK_FREQ * (1 + (frqcr >> 24 & 0xF));
}
static int master_clk_setrate(struct clk *clk, unsigned long rate, int id)
{
- int div = rate / clk->rate;
+ int div = rate / SH7722_PLL_FREQ;
int master_divs[] = { 2, 3, 4, 6, 8, 16 };
int index;
unsigned long frqcr;
+ if (rate < SH7722_PLL_FREQ * 2)
+ return -EINVAL;
+
for (index = 1; index < ARRAY_SIZE(master_divs); index++)
if (div >= master_divs[index - 1] && div < master_divs[index])
break;
@@ -192,10 +185,6 @@ static struct clk_ops sh7722_master_clk_ops = {
.set_rate = master_clk_setrate,
};
-static struct clk_ops sh7722_module_clk_ops = {
- .recalc = module_clk_recalc,
-};
-
struct frqcr_context {
unsigned mask;
unsigned shift;
@@ -500,7 +489,7 @@ static void sh7722_siu_recalc(struct clk *clk)
if (siu < 0)
return /* siu */ ;
- BUG_ON(siu > 2);
+ BUG_ON(siu > 1);
r = ctrl_inl(sh7722_siu_regs[siu]);
clk->rate = clk->parent->rate * 2 / divisors2[r & 0xF];
}
@@ -582,7 +571,7 @@ static struct clk *sh7722_clocks[] = {
*/
struct clk_ops *onchip_ops[] = {
&sh7722_master_clk_ops,
- &sh7722_module_clk_ops,
+ &sh7722_frqcr_clk_ops,
&sh7722_frqcr_clk_ops,
&sh7722_frqcr_clk_ops,
};
@@ -594,7 +583,7 @@ arch_init_clk_ops(struct clk_ops **ops, int type)
*ops = onchip_ops[type];
}
-int __init arch_clk_init(void)
+int __init sh7722_clock_init(void)
{
struct clk *master;
int i;
@@ -608,3 +597,4 @@ int __init arch_clk_init(void)
clk_put(master);
return 0;
}
+arch_initcall(sh7722_clock_init);
diff --git a/trunk/arch/sh/kernel/kgdb_stub.c b/trunk/arch/sh/kernel/kgdb_stub.c
index edd1ec214e6d..a5323364cbca 100644
--- a/trunk/arch/sh/kernel/kgdb_stub.c
+++ b/trunk/arch/sh/kernel/kgdb_stub.c
@@ -2,7 +2,7 @@
* May be copied or modified under the terms of the GNU General Public
* License. See linux/COPYING for more information.
*
- * Contains extracts from code by Glenn Engel, Jim Kingdon,
+ * Containes extracts from code by Glenn Engel, Jim Kingdon,
* David Grothe , Tigran Aivazian ,
* Amit S. Kale , William Gatliff ,
* Ben Lee, Steve Chamberlain and Benoit Miller .
@@ -85,7 +85,7 @@
*
* Responses can be run-length encoded to save space. A '*' means that
* the next character is an ASCII encoding giving a repeat count which
- * stands for that many repetitions of the character preceding the '*'.
+ * stands for that many repititions of the character preceding the '*'.
* The encoding is n+29, yielding a printable character where n >=3
* (which is where RLE starts to win). Don't use an n > 126.
*
diff --git a/trunk/arch/sh/kernel/process.c b/trunk/arch/sh/kernel/process.c
index a11e2aa73cbc..6b4f5748d0be 100644
--- a/trunk/arch/sh/kernel/process.c
+++ b/trunk/arch/sh/kernel/process.c
@@ -26,6 +26,8 @@
static int hlt_counter;
int ubc_usercnt = 0;
+#define HARD_IDLE_TIMEOUT (HZ / 3)
+
void (*pm_idle)(void);
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
@@ -42,39 +44,16 @@ void enable_hlt(void)
}
EXPORT_SYMBOL(enable_hlt);
-static int __init nohlt_setup(char *__unused)
-{
- hlt_counter = 1;
- return 1;
-}
-__setup("nohlt", nohlt_setup);
-
-static int __init hlt_setup(char *__unused)
-{
- hlt_counter = 0;
- return 1;
-}
-__setup("hlt", hlt_setup);
-
void default_idle(void)
{
- if (!hlt_counter) {
- clear_thread_flag(TIF_POLLING_NRFLAG);
- smp_mb__after_clear_bit();
- set_bl_bit();
- while (!need_resched())
- cpu_sleep();
- clear_bl_bit();
- set_thread_flag(TIF_POLLING_NRFLAG);
- } else
- while (!need_resched())
- cpu_relax();
+ if (!hlt_counter)
+ cpu_sleep();
+ else
+ cpu_relax();
}
void cpu_idle(void)
{
- set_thread_flag(TIF_POLLING_NRFLAG);
-
/* endless idle loop with no priority at all */
while (1) {
void (*idle)(void) = pm_idle;
diff --git a/trunk/arch/sh/kernel/syscalls.S b/trunk/arch/sh/kernel/syscalls.S
index 7db1c2dc5992..4357d1a6358f 100644
--- a/trunk/arch/sh/kernel/syscalls.S
+++ b/trunk/arch/sh/kernel/syscalls.S
@@ -355,6 +355,3 @@ ENTRY(sys_call_table)
.long sys_getcpu
.long sys_epoll_pwait
.long sys_utimensat /* 320 */
- .long sys_signalfd
- .long sys_timerfd
- .long sys_eventfd
diff --git a/trunk/arch/sh/kernel/traps.c b/trunk/arch/sh/kernel/traps.c
index 5b75cb6f8f9b..3a197649cd83 100644
--- a/trunk/arch/sh/kernel/traps.c
+++ b/trunk/arch/sh/kernel/traps.c
@@ -21,7 +21,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -102,16 +101,6 @@ void die(const char * str, struct pt_regs * regs, long err)
bust_spinlocks(0);
spin_unlock_irq(&die_lock);
-
- if (kexec_should_crash(current))
- crash_kexec(regs);
-
- if (in_interrupt())
- panic("Fatal exception in interrupt");
-
- if (panic_on_oops)
- panic("Fatal exception");
-
do_exit(SIGSEGV);
}
@@ -524,7 +513,7 @@ static int handle_unaligned_access(u16 instruction, struct pt_regs *regs)
* misaligned data access
* access to >= 0x80000000 is user mode
* Unfortuntaly we can't distinguish between instruction address error
- * and data address errors caused by read accesses.
+ * and data address errors caused by read acceses.
*/
asmlinkage void do_address_error(struct pt_regs *regs,
unsigned long writeaccess,
diff --git a/trunk/arch/sh/math-emu/math.c b/trunk/arch/sh/math-emu/math.c
index a38e1eed9e77..1efbac15ff4e 100644
--- a/trunk/arch/sh/math-emu/math.c
+++ b/trunk/arch/sh/math-emu/math.c
@@ -148,7 +148,7 @@ fmac(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
return 0;
}
-// to process fmov's extension (odd n for DR access XD).
+// to process fmov's extention (odd n for DR access XD).
#define FMOV_EXT(x) if(x&1) x+=16-1
static int
diff --git a/trunk/arch/sh/mm/copy_page.S b/trunk/arch/sh/mm/copy_page.S
index ae039f2da162..397c94c97315 100644
--- a/trunk/arch/sh/mm/copy_page.S
+++ b/trunk/arch/sh/mm/copy_page.S
@@ -129,7 +129,6 @@ ENTRY(__copy_user_page)
rts
nop
#endif
- .align 2
.Lpsz: .long PAGE_SIZE
/*
* __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n);
diff --git a/trunk/arch/sh/mm/fault.c b/trunk/arch/sh/mm/fault.c
index c878faa4ae46..9207da67ff8a 100644
--- a/trunk/arch/sh/mm/fault.c
+++ b/trunk/arch/sh/mm/fault.c
@@ -15,11 +15,43 @@
#include
#include
#include
+#include
#include
#include
#include
#include
+#ifdef CONFIG_KPROBES
+ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain);
+
+/* Hook to register for page fault notifications */
+int register_page_fault_notifier(struct notifier_block *nb)
+{
+ return atomic_notifier_chain_register(¬ify_page_fault_chain, nb);
+}
+
+int unregister_page_fault_notifier(struct notifier_block *nb)
+{
+ return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb);
+}
+
+static inline int notify_page_fault(enum die_val val, struct pt_regs *regs,
+ int trap, int sig)
+{
+ struct die_args args = {
+ .regs = regs,
+ .trapnr = trap,
+ };
+ return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args);
+}
+#else
+static inline int notify_page_fault(enum die_val val, struct pt_regs *regs,
+ int trap, int sig)
+{
+ return NOTIFY_DONE;
+}
+#endif
+
/*
* This routine handles page faults. It determines the address,
* and the problem, and then passes it off to one of the appropriate
@@ -37,6 +69,11 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
siginfo_t info;
trace_hardirqs_on();
+
+ if (notify_page_fault(DIE_PAGE_FAULT, regs,
+ writeaccess, SIGSEGV) == NOTIFY_STOP)
+ return;
+
local_irq_enable();
#ifdef CONFIG_SH_KGDB
@@ -248,7 +285,7 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
pte_t *pte;
pte_t entry;
struct mm_struct *mm = current->mm;
- spinlock_t *ptl = NULL;
+ spinlock_t *ptl;
int ret = 1;
#ifdef CONFIG_SH_KGDB
diff --git a/trunk/arch/sh/mm/init.c b/trunk/arch/sh/mm/init.c
index e0e644ff3204..8fe223a890ed 100644
--- a/trunk/arch/sh/mm/init.c
+++ b/trunk/arch/sh/mm/init.c
@@ -12,7 +12,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -113,7 +112,7 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
* As a performance optimization, other platforms preserve the fixmap mapping
* across a context switch, we don't presently do this, but this could be done
* in a similar fashion as to the wired TLB interface that sh64 uses (by way
- * of the memory mapped UTLB configuration) -- this unfortunately forces us to
+ * of the memorry mapped UTLB configuration) -- this unfortunately forces us to
* give up a TLB entry for each mapping we want to preserve. While this may be
* viable for a small number of fixmaps, it's not particularly useful for
* everything and needs to be carefully evaluated. (ie, we may want this for
diff --git a/trunk/arch/sh/mm/pmb.c b/trunk/arch/sh/mm/pmb.c
index b6a5a338145b..02aae06527dc 100644
--- a/trunk/arch/sh/mm/pmb.c
+++ b/trunk/arch/sh/mm/pmb.c
@@ -3,7 +3,7 @@
*
* Privileged Space Mapping Buffer (PMB) Support.
*
- * Copyright (C) 2005, 2006, 2007 Paul Mundt
+ * Copyright (C) 2005, 2006 Paul Mundt
*
* P1/P2 Section mapping definitions from map32.h, which was:
*
@@ -68,32 +68,6 @@ static inline unsigned long mk_pmb_data(unsigned int entry)
return mk_pmb_entry(entry) | PMB_DATA;
}
-static DEFINE_SPINLOCK(pmb_list_lock);
-static struct pmb_entry *pmb_list;
-
-static inline void pmb_list_add(struct pmb_entry *pmbe)
-{
- struct pmb_entry **p, *tmp;
-
- p = &pmb_list;
- while ((tmp = *p) != NULL)
- p = &tmp->next;
-
- pmbe->next = tmp;
- *p = pmbe;
-}
-
-static inline void pmb_list_del(struct pmb_entry *pmbe)
-{
- struct pmb_entry **p, *tmp;
-
- for (p = &pmb_list; (tmp = *p); p = &tmp->next)
- if (tmp == pmbe) {
- *p = tmp->next;
- return;
- }
-}
-
struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
unsigned long flags)
{
@@ -107,19 +81,11 @@ struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
pmbe->ppn = ppn;
pmbe->flags = flags;
- spin_lock_irq(&pmb_list_lock);
- pmb_list_add(pmbe);
- spin_unlock_irq(&pmb_list_lock);
-
return pmbe;
}
void pmb_free(struct pmb_entry *pmbe)
{
- spin_lock_irq(&pmb_list_lock);
- pmb_list_del(pmbe);
- spin_unlock_irq(&pmb_list_lock);
-
kmem_cache_free(pmb_cache, pmbe);
}
@@ -201,6 +167,31 @@ void clear_pmb_entry(struct pmb_entry *pmbe)
clear_bit(entry, &pmb_map);
}
+static DEFINE_SPINLOCK(pmb_list_lock);
+static struct pmb_entry *pmb_list;
+
+static inline void pmb_list_add(struct pmb_entry *pmbe)
+{
+ struct pmb_entry **p, *tmp;
+
+ p = &pmb_list;
+ while ((tmp = *p) != NULL)
+ p = &tmp->next;
+
+ pmbe->next = tmp;
+ *p = pmbe;
+}
+
+static inline void pmb_list_del(struct pmb_entry *pmbe)
+{
+ struct pmb_entry **p, *tmp;
+
+ for (p = &pmb_list; (tmp = *p); p = &tmp->next)
+ if (tmp == pmbe) {
+ *p = tmp->next;
+ return;
+ }
+}
static struct {
unsigned long size;
@@ -292,14 +283,25 @@ void pmb_unmap(unsigned long addr)
} while (pmbe);
}
-static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep,
- unsigned long flags)
+static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep, unsigned long flags)
{
struct pmb_entry *pmbe = pmb;
memset(pmb, 0, sizeof(struct pmb_entry));
+ spin_lock_irq(&pmb_list_lock);
+
pmbe->entry = PMB_NO_ENTRY;
+ pmb_list_add(pmbe);
+
+ spin_unlock_irq(&pmb_list_lock);
+}
+
+static void pmb_cache_dtor(void *pmb, struct kmem_cache *cachep, unsigned long flags)
+{
+ spin_lock_irq(&pmb_list_lock);
+ pmb_list_del(pmb);
+ spin_unlock_irq(&pmb_list_lock);
}
static int __init pmb_init(void)
@@ -310,7 +312,8 @@ static int __init pmb_init(void)
BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES));
pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0,
- SLAB_PANIC, pmb_cache_ctor, NULL);
+ SLAB_PANIC, pmb_cache_ctor,
+ pmb_cache_dtor);
jump_to_P2();
diff --git a/trunk/arch/sh/tools/mach-types b/trunk/arch/sh/tools/mach-types
index fb40f188aff9..554f801db67b 100644
--- a/trunk/arch/sh/tools/mach-types
+++ b/trunk/arch/sh/tools/mach-types
@@ -7,11 +7,8 @@
#
SE SH_SOLUTION_ENGINE
7751SE SH_7751_SOLUTION_ENGINE
-7722SE SH_7722_SOLUTION_ENGINE
7300SE SH_7300_SOLUTION_ENGINE
7343SE SH_7343_SOLUTION_ENGINE
-7206SE SH_7206_SOLUTION_ENGINE
-7619SE SH_7619_SOLUTION_ENGINE
7780SE SH_7780_SOLUTION_ENGINE
73180SE SH_73180_SOLUTION_ENGINE
7751SYSTEMH SH_7751_SYSTEMH
@@ -34,3 +31,5 @@ R7785RP SH_R7785RP
TITAN SH_TITAN
SHMIN SH_SHMIN
7710VOIPGW SH_7710VOIPGW
+7206SE SH_7206_SOLUTION_ENGINE
+7619SE SH_7619_SOLUTION_ENGINE
diff --git a/trunk/drivers/char/Kconfig b/trunk/drivers/char/Kconfig
index ef683ebd367c..abcafac64738 100644
--- a/trunk/drivers/char/Kconfig
+++ b/trunk/drivers/char/Kconfig
@@ -815,7 +815,7 @@ config SGI_IP27_RTC
config GEN_RTC
tristate "Generic /dev/rtc emulation"
- depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC && !FRV && !S390 && !SUPERH
+ depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC && !FRV && !S390
---help---
If you say Y here and create a character special file /dev/rtc with
major number 10 and minor number 135 using mknod ("man mknod"), you
diff --git a/trunk/drivers/i2c/busses/i2c-s3c2410.c b/trunk/drivers/i2c/busses/i2c-s3c2410.c
index e4540fcf6476..e68a96f589fd 100644
--- a/trunk/drivers/i2c/busses/i2c-s3c2410.c
+++ b/trunk/drivers/i2c/busses/i2c-s3c2410.c
@@ -830,8 +830,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
i2c->irq = res;
- dev_dbg(&pdev->dev, "irq resource %p (%lu)\n", res,
- (unsigned long)res->start);
+ dev_dbg(&pdev->dev, "irq resource %p (%ld)\n", res, res->start);
ret = i2c_add_adapter(&i2c->adap);
if (ret < 0) {
diff --git a/trunk/drivers/i2c/busses/i2c-tiny-usb.c b/trunk/drivers/i2c/busses/i2c-tiny-usb.c
index cb9abe7565a7..907999049d50 100644
--- a/trunk/drivers/i2c/busses/i2c-tiny-usb.c
+++ b/trunk/drivers/i2c/busses/i2c-tiny-usb.c
@@ -208,7 +208,7 @@ static int i2c_tiny_usb_probe(struct usb_interface *interface,
dev->adapter.class = I2C_CLASS_HWMON;
dev->adapter.algo = &usb_algorithm;
dev->adapter.algo_data = dev;
- snprintf(dev->adapter.name, sizeof(dev->adapter.name),
+ snprintf(dev->adapter.name, I2C_NAME_SIZE,
"i2c-tiny-usb at bus %03d device %03d",
dev->usb_dev->bus->busnum, dev->usb_dev->devnum);
diff --git a/trunk/drivers/i2c/i2c-core.c b/trunk/drivers/i2c/i2c-core.c
index 435925eba437..64f8e56d300e 100644
--- a/trunk/drivers/i2c/i2c-core.c
+++ b/trunk/drivers/i2c/i2c-core.c
@@ -697,10 +697,9 @@ int i2c_attach_client(struct i2c_client *client)
if (client->driver)
client->dev.driver = &client->driver->driver;
- if (client->driver && !is_newstyle_driver(client->driver)) {
+ if (client->driver && !is_newstyle_driver(client->driver))
client->dev.release = i2c_client_release;
- client->dev.uevent_suppress = 1;
- } else
+ else
client->dev.release = i2c_client_dev_release;
snprintf(&client->dev.bus_id[0], sizeof(client->dev.bus_id),
diff --git a/trunk/drivers/input/joystick/iforce/iforce-main.c b/trunk/drivers/input/joystick/iforce/iforce-main.c
index 682244b1c042..fb129c479a66 100644
--- a/trunk/drivers/input/joystick/iforce/iforce-main.c
+++ b/trunk/drivers/input/joystick/iforce/iforce-main.c
@@ -370,8 +370,10 @@ int iforce_init_device(struct iforce *iforce)
/*
* Disable spring, enable force feedback.
+ * FIXME: We should use iforce_set_autocenter() et al here.
*/
- iforce_set_autocenter(input_dev, 0);
+
+ iforce_send_packet(iforce, FF_CMD_AUTOCENTER, "\004\000");
/*
* Find appropriate device entry
diff --git a/trunk/drivers/input/joystick/iforce/iforce-packets.c b/trunk/drivers/input/joystick/iforce/iforce-packets.c
index 3154ccd74000..21c4e13d3a50 100644
--- a/trunk/drivers/input/joystick/iforce/iforce-packets.c
+++ b/trunk/drivers/input/joystick/iforce/iforce-packets.c
@@ -246,8 +246,6 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
int iforce_get_id_packet(struct iforce *iforce, char *packet)
{
- int status;
-
switch (iforce->bus) {
case IFORCE_USB:
@@ -256,22 +254,18 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
iforce->cr.bRequest = packet[0];
iforce->ctrl->dev = iforce->usbdev;
- status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC);
- if (status) {
- err("usb_submit_urb failed %d", status);
+ if (usb_submit_urb(iforce->ctrl, GFP_ATOMIC))
return -1;
- }
wait_event_interruptible_timeout(iforce->wait,
iforce->ctrl->status != -EINPROGRESS, HZ);
if (iforce->ctrl->status) {
- dbg("iforce->ctrl->status = %d", iforce->ctrl->status);
usb_unlink_urb(iforce->ctrl);
return -1;
}
#else
- dbg("iforce_get_id_packet: iforce->bus = USB!");
+ err("iforce_get_id_packet: iforce->bus = USB!");
#endif
break;
diff --git a/trunk/drivers/input/joystick/iforce/iforce-usb.c b/trunk/drivers/input/joystick/iforce/iforce-usb.c
index 1457b73850e7..750099d8e3c6 100644
--- a/trunk/drivers/input/joystick/iforce/iforce-usb.c
+++ b/trunk/drivers/input/joystick/iforce/iforce-usb.c
@@ -65,7 +65,6 @@ void iforce_usb_xmit(struct iforce *iforce)
XMIT_INC(iforce->xmit.tail, n);
if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) {
- clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
warn("usb_submit_urb failed %d\n", n);
}
@@ -164,8 +163,8 @@ static int iforce_usb_probe(struct usb_interface *intf,
usb_fill_int_urb(iforce->irq, dev, usb_rcvintpipe(dev, epirq->bEndpointAddress),
iforce->data, 16, iforce_usb_irq, iforce, epirq->bInterval);
- usb_fill_int_urb(iforce->out, dev, usb_sndintpipe(dev, epout->bEndpointAddress),
- iforce + 1, 32, iforce_usb_out, iforce, epout->bInterval);
+ usb_fill_bulk_urb(iforce->out, dev, usb_sndbulkpipe(dev, epout->bEndpointAddress),
+ iforce + 1, 32, iforce_usb_out, iforce);
usb_fill_control_urb(iforce->ctrl, dev, usb_rcvctrlpipe(dev, 0),
(void*) &iforce->cr, iforce->edata, 16, iforce_usb_ctrl, iforce);
diff --git a/trunk/drivers/input/misc/input-polldev.c b/trunk/drivers/input/misc/input-polldev.c
index b773d4c756a6..1b2b9c9c5d88 100644
--- a/trunk/drivers/input/misc/input-polldev.c
+++ b/trunk/drivers/input/misc/input-polldev.c
@@ -12,11 +12,6 @@
#include
#include
-MODULE_AUTHOR("Dmitry Torokhov ");
-MODULE_DESCRIPTION("Generic implementation of a polled input device");
-MODULE_LICENSE("GPL v2");
-MODULE_VERSION("0.1");
-
static DEFINE_MUTEX(polldev_mutex);
static int polldev_users;
static struct workqueue_struct *polldev_wq;
diff --git a/trunk/drivers/input/mouse/alps.c b/trunk/drivers/input/mouse/alps.c
index 2c5f11a4f6b4..cf3e4664e72b 100644
--- a/trunk/drivers/input/mouse/alps.c
+++ b/trunk/drivers/input/mouse/alps.c
@@ -251,15 +251,11 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
dbg("E7 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]);
- if (version) {
- for (i = 0; i < ARRAY_SIZE(rates) && param[2] != rates[i]; i++)
- /* empty */;
- *version = (param[0] << 8) | (param[1] << 4) | i;
- }
+ for (i = 0; i < ARRAY_SIZE(rates) && param[2] != rates[i]; i++);
+ *version = (param[0] << 8) | (param[1] << 4) | i;
for (i = 0; i < ARRAY_SIZE(alps_model_data); i++)
- if (!memcmp(param, alps_model_data[i].signature,
- sizeof(alps_model_data[i].signature)))
+ if (!memcmp(param, alps_model_data[i].signature, sizeof(alps_model_data[i].signature)))
return alps_model_data + i;
return NULL;
@@ -384,46 +380,32 @@ static int alps_poll(struct psmouse *psmouse)
return 0;
}
-static int alps_hw_init(struct psmouse *psmouse, int *version)
+static int alps_reconnect(struct psmouse *psmouse)
{
struct alps_data *priv = psmouse->private;
+ int version;
- priv->i = alps_get_model(psmouse, version);
- if (!priv->i)
+ psmouse_reset(psmouse);
+
+ if (!(priv->i = alps_get_model(psmouse, &version)))
return -1;
if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1))
return -1;
if (alps_tap_mode(psmouse, 1)) {
- printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n");
+ printk(KERN_WARNING "alps.c: Failed to reenable hardware tapping\n");
return -1;
}
if (alps_absolute_mode(psmouse)) {
- printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
+ printk(KERN_ERR "alps.c: Failed to reenable absolute mode\n");
return -1;
}
if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 0))
return -1;
- /* ALPS needs stream mode, otherwise it won't report any data */
- if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSTREAM)) {
- printk(KERN_ERR "alps.c: Failed to enable stream mode\n");
- return -1;
- }
-
- return 0;
-}
-
-static int alps_reconnect(struct psmouse *psmouse)
-{
- psmouse_reset(psmouse);
-
- if (alps_hw_init(psmouse, NULL))
- return -1;
-
return 0;
}
@@ -448,9 +430,23 @@ int alps_init(struct psmouse *psmouse)
goto init_fail;
priv->dev2 = dev2;
- psmouse->private = priv;
- if (alps_hw_init(psmouse, &version))
+ priv->i = alps_get_model(psmouse, &version);
+ if (!priv->i)
+ goto init_fail;
+
+ if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1))
+ goto init_fail;
+
+ if (alps_tap_mode(psmouse, 1))
+ printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n");
+
+ if (alps_absolute_mode(psmouse)) {
+ printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
+ goto init_fail;
+ }
+
+ if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 0))
goto init_fail;
dev1->evbit[LONG(EV_KEY)] |= BIT(EV_KEY);
@@ -497,13 +493,13 @@ int alps_init(struct psmouse *psmouse)
/* We are having trouble resyncing ALPS touchpads so disable it for now */
psmouse->resync_time = 0;
+ psmouse->private = priv;
return 0;
init_fail:
psmouse_reset(psmouse);
input_free_device(dev2);
kfree(priv);
- psmouse->private = NULL;
return -1;
}
diff --git a/trunk/drivers/input/mouse/logips2pp.c b/trunk/drivers/input/mouse/logips2pp.c
index 0c5660d28caa..9df74b72e6c4 100644
--- a/trunk/drivers/input/mouse/logips2pp.c
+++ b/trunk/drivers/input/mouse/logips2pp.c
@@ -221,7 +221,6 @@ static const struct ps2pp_info *get_model_info(unsigned char model)
{ 66, PS2PP_KIND_MX, /* MX3100 reciver */
PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN |
PS2PP_EXTRA_BTN | PS2PP_NAV_BTN | PS2PP_HWHEEL },
- { 72, PS2PP_KIND_TRACKMAN, 0 }, /* T-CH11: TrackMan Marble */
{ 73, 0, PS2PP_SIDE_BTN },
{ 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL },
{ 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL },
diff --git a/trunk/drivers/input/touchscreen/Kconfig b/trunk/drivers/input/touchscreen/Kconfig
index e5cca9bd0406..4f091800bfeb 100644
--- a/trunk/drivers/input/touchscreen/Kconfig
+++ b/trunk/drivers/input/touchscreen/Kconfig
@@ -12,17 +12,17 @@ menuconfig INPUT_TOUCHSCREEN
if INPUT_TOUCHSCREEN
config TOUCHSCREEN_ADS7846
- tristate "ADS7846/TSC2046 and ADS7843 based touchscreens"
+ tristate "ADS 7846/7843 based touchscreens"
depends on SPI_MASTER
depends on HWMON = n || HWMON
help
Say Y here if you have a touchscreen interface using the
- ADS7846/TSC2046 or ADS7843 controller, and your board-specific
- setup code includes that in its table of SPI devices.
+ ADS7846 or ADS7843 controller, and your board-specific setup
+ code includes that in its table of SPI devices.
If HWMON is selected, and the driver is told the reference voltage
on your board, you will also get hwmon interfaces for the voltage
- (and on ads7846/tsc2046, temperature) sensors of this chip.
+ (and on ads7846, temperature) sensors of this chip.
If unsure, say N (but it's safe to say "Y").
diff --git a/trunk/drivers/input/touchscreen/ads7846.c b/trunk/drivers/input/touchscreen/ads7846.c
index 1c9069cd3bae..693e3b2a65a3 100644
--- a/trunk/drivers/input/touchscreen/ads7846.c
+++ b/trunk/drivers/input/touchscreen/ads7846.c
@@ -39,7 +39,6 @@
/*
* This code has been heavily tested on a Nokia 770, and lightly
* tested on other ads7846 devices (OSK/Mistral, Lubbock).
- * TSC2046 is just newer ads7846 silicon.
* Support for ads7843 tested on Atmel at91sam926x-EK.
* Support for ads7845 has only been stubbed in.
*
@@ -848,7 +847,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)
* may not. So we stick to very-portable 8 bit words, both RX and TX.
*/
spi->bits_per_word = 8;
- spi->mode = SPI_MODE_0;
+ spi->mode = SPI_MODE_1;
err = spi_setup(spi);
if (err < 0)
return err;
diff --git a/trunk/drivers/input/touchscreen/hp680_ts_input.c b/trunk/drivers/input/touchscreen/hp680_ts_input.c
index 1a15475aedfc..61c15024c2a0 100644
--- a/trunk/drivers/input/touchscreen/hp680_ts_input.c
+++ b/trunk/drivers/input/touchscreen/hp680_ts_input.c
@@ -1,6 +1,7 @@
#include
#include
#include
+
#include
#include
#include
@@ -17,12 +18,12 @@
#define PHDR 0xa400012e
#define SCPDR 0xa4000136
-static void do_softint(struct work_struct *work);
+static void do_softint(void *data);
static struct input_dev *hp680_ts_dev;
-static DECLARE_DELAYED_WORK(work, do_softint);
+static DECLARE_WORK(work, do_softint);
-static void do_softint(struct work_struct *work)
+static void do_softint(void *data)
{
int absx = 0, absy = 0;
u8 scpdr;
diff --git a/trunk/drivers/input/touchscreen/ucb1400_ts.c b/trunk/drivers/input/touchscreen/ucb1400_ts.c
index f0cbcdb008ed..6582816a0477 100644
--- a/trunk/drivers/input/touchscreen/ucb1400_ts.c
+++ b/trunk/drivers/input/touchscreen/ucb1400_ts.c
@@ -288,9 +288,9 @@ static int ucb1400_ts_thread(void *_ucb)
struct ucb1400 *ucb = _ucb;
struct task_struct *tsk = current;
int valid = 0;
- struct sched_param param = { .sched_priority = 1 };
- sched_setscheduler(tsk, SCHED_FIFO, ¶m);
+ tsk->policy = SCHED_FIFO;
+ tsk->rt_priority = 1;
while (!kthread_should_stop()) {
unsigned int x, y, p;
diff --git a/trunk/drivers/macintosh/adbhid.c b/trunk/drivers/macintosh/adbhid.c
index b46817f699f1..b77ef5187d6d 100644
--- a/trunk/drivers/macintosh/adbhid.c
+++ b/trunk/drivers/macintosh/adbhid.c
@@ -628,16 +628,16 @@ static void real_leds(unsigned char leds, int device)
*/
static int adbhid_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
{
- struct adbhid *adbhid = input_get_drvdata(dev);
+ struct adbhid *adbhid = dev->private;
unsigned char leds;
switch (type) {
case EV_LED:
- leds = (test_bit(LED_SCROLLL, dev->led) ? 4 : 0) |
- (test_bit(LED_NUML, dev->led) ? 1 : 0) |
- (test_bit(LED_CAPSL, dev->led) ? 2 : 0);
- real_leds(leds, adbhid->id);
- return 0;
+ leds = (test_bit(LED_SCROLLL, dev->led) ? 4 : 0)
+ | (test_bit(LED_NUML, dev->led) ? 1 : 0)
+ | (test_bit(LED_CAPSL, dev->led) ? 2 : 0);
+ real_leds(leds, adbhid->id);
+ return 0;
}
return -1;
@@ -649,7 +649,7 @@ adb_message_handler(struct notifier_block *this, unsigned long code, void *x)
switch (code) {
case ADB_MSG_PRE_RESET:
case ADB_MSG_POWERDOWN:
- /* Stop the repeat timer. Autopoll is already off at this point */
+ /* Stop the repeat timer. Autopoll is already off at this point */
{
int i;
for (i = 1; i < 16; i++) {
@@ -699,7 +699,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
hid->current_handler_id = current_handler_id;
hid->mouse_kind = mouse_kind;
hid->flags = 0;
- input_set_drvdata(input_dev, hid);
+ input_dev->private = hid;
input_dev->name = hid->name;
input_dev->phys = hid->phys;
input_dev->id.bustype = BUS_ADB;
diff --git a/trunk/drivers/media/dvb/bt8xx/dst.c b/trunk/drivers/media/dvb/bt8xx/dst.c
index e908e3cf1e50..0393a3d19920 100644
--- a/trunk/drivers/media/dvb/bt8xx/dst.c
+++ b/trunk/drivers/media/dvb/bt8xx/dst.c
@@ -1721,6 +1721,9 @@ static void dst_release(struct dvb_frontend *fe)
symbol_put(dst_ca_attach);
#endif
}
+#ifdef CONFIG_DVB_CORE_ATTACH
+ symbol_put(dst_attach);
+#endif
kfree(state);
}
diff --git a/trunk/drivers/media/dvb/dvb-core/dvbdev.c b/trunk/drivers/media/dvb/dvb-core/dvbdev.c
index a9fa3337dd81..e23d8a0ea1d3 100644
--- a/trunk/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/trunk/drivers/media/dvb/dvb-core/dvbdev.c
@@ -200,7 +200,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
{
struct dvb_device *dvbdev;
struct file_operations *dvbdevfops;
- struct class_device *clsdev;
+
int id;
mutex_lock(&dvbdev_register_lock);
@@ -242,15 +242,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
mutex_unlock(&dvbdev_register_lock);
- clsdev = class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR,
- nums2minor(adap->num, type, id)),
- adap->device, "dvb%d.%s%d", adap->num,
- dnames[type], id);
- if (IS_ERR(clsdev)) {
- printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n",
- __FUNCTION__, adap->num, dnames[type], id, PTR_ERR(clsdev));
- return PTR_ERR(clsdev);
- }
+ class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
+ adap->device, "dvb%d.%s%d", adap->num, dnames[type], id);
dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n",
adap->num, dnames[type], id, nums2minor(adap->num, type, id),
@@ -438,7 +431,7 @@ static void __exit exit_dvbdev(void)
unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);
}
-subsys_initcall(init_dvbdev);
+module_init(init_dvbdev);
module_exit(exit_dvbdev);
MODULE_DESCRIPTION("DVB Core Driver");
diff --git a/trunk/drivers/media/video/cafe_ccic-regs.h b/trunk/drivers/media/video/cafe_ccic-regs.h
index 8e2a87cdc791..b2c22a0d6643 100644
--- a/trunk/drivers/media/video/cafe_ccic-regs.h
+++ b/trunk/drivers/media/video/cafe_ccic-regs.h
@@ -150,12 +150,6 @@
#define REG_GL_IMASK 0x300c /* Interrupt mask register */
#define GIMSK_CCIC_EN 0x00000004 /* CCIC Interrupt enable */
-#define REG_GL_FCR 0x3038 /* GPIO functional control register */
-#define GFCR_GPIO_ON 0x08 /* Camera GPIO enabled */
-#define REG_GL_GPIOR 0x315c /* GPIO register */
-#define GGPIO_OUT 0x80000 /* GPIO output */
-#define GGPIO_VAL 0x00008 /* Output pin value */
-
#define REG_LEN REG_GL_IMASK + 4
diff --git a/trunk/drivers/media/video/cafe_ccic.c b/trunk/drivers/media/video/cafe_ccic.c
index c08f650df423..96254dbaf625 100644
--- a/trunk/drivers/media/video/cafe_ccic.c
+++ b/trunk/drivers/media/video/cafe_ccic.c
@@ -774,12 +774,6 @@ static void cafe_ctlr_power_up(struct cafe_camera *cam)
spin_lock_irqsave(&cam->dev_lock, flags);
cafe_reg_clear_bit(cam, REG_CTRL1, C1_PWRDWN);
- /*
- * Part one of the sensor dance: turn the global
- * GPIO signal on.
- */
- cafe_reg_write(cam, REG_GL_FCR, GFCR_GPIO_ON);
- cafe_reg_write(cam, REG_GL_GPIOR, GGPIO_OUT|GGPIO_VAL);
/*
* Put the sensor into operational mode (assumes OLPC-style
* wiring). Control 0 is reset - set to 1 to operate.
@@ -790,7 +784,6 @@ static void cafe_ctlr_power_up(struct cafe_camera *cam)
cafe_reg_write(cam, REG_GPR, GPR_C1EN|GPR_C0EN|GPR_C0);
// mdelay(1); /* Enough? */
spin_unlock_irqrestore(&cam->dev_lock, flags);
- msleep(5); /* Just to be sure */
}
static void cafe_ctlr_power_down(struct cafe_camera *cam)
@@ -799,8 +792,6 @@ static void cafe_ctlr_power_down(struct cafe_camera *cam)
spin_lock_irqsave(&cam->dev_lock, flags);
cafe_reg_write(cam, REG_GPR, GPR_C1EN|GPR_C0EN|GPR_C1);
- cafe_reg_write(cam, REG_GL_FCR, GFCR_GPIO_ON);
- cafe_reg_write(cam, REG_GL_GPIOR, GGPIO_OUT);
cafe_reg_set_bit(cam, REG_CTRL1, C1_PWRDWN);
spin_unlock_irqrestore(&cam->dev_lock, flags);
}
@@ -860,7 +851,6 @@ static int cafe_cam_init(struct cafe_camera *cam)
ret = 0;
cam->state = S_IDLE;
out:
- cafe_ctlr_power_down(cam);
mutex_unlock(&cam->s_mutex);
return ret;
}
@@ -2113,16 +2103,10 @@ static int cafe_pci_probe(struct pci_dev *pdev,
ret = request_irq(pdev->irq, cafe_irq, IRQF_SHARED, "cafe-ccic", cam);
if (ret)
goto out_iounmap;
- /*
- * Initialize the controller and leave it powered up. It will
- * stay that way until the sensor driver shows up.
- */
cafe_ctlr_init(cam);
cafe_ctlr_power_up(cam);
/*
- * Set up I2C/SMBUS communications. We have to drop the mutex here
- * because the sensor could attach in this call chain, leading to
- * unsightly deadlocks.
+ * Set up I2C/SMBUS communications
*/
mutex_unlock(&cam->s_mutex); /* attach can deadlock */
ret = cafe_smbus_setup(cam);
diff --git a/trunk/drivers/media/video/em28xx/Kconfig b/trunk/drivers/media/video/em28xx/Kconfig
index 5b6a40371602..2c450bd05af5 100644
--- a/trunk/drivers/media/video/em28xx/Kconfig
+++ b/trunk/drivers/media/video/em28xx/Kconfig
@@ -1,6 +1,7 @@
config VIDEO_EM28XX
tristate "Empia EM2800/2820/2840 USB video capture support"
- depends on VIDEO_V4L1 && I2C
+ depends on VIDEO_V4L1 && I2C && PCI
+ select VIDEO_BUF
select VIDEO_TUNER
select VIDEO_TVEEPROM
select VIDEO_IR
diff --git a/trunk/drivers/media/video/ivtv/Kconfig b/trunk/drivers/media/video/ivtv/Kconfig
index 1aaeaa02f158..0cc98a0e2496 100644
--- a/trunk/drivers/media/video/ivtv/Kconfig
+++ b/trunk/drivers/media/video/ivtv/Kconfig
@@ -1,6 +1,6 @@
config VIDEO_IVTV
tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support"
- depends on VIDEO_V4L1 && VIDEO_V4L2 && PCI && I2C && EXPERIMENTAL
+ depends on VIDEO_V4L1 && VIDEO_V4L2 && USB && I2C && EXPERIMENTAL && PCI
select FW_LOADER
select VIDEO_TUNER
select VIDEO_TVEEPROM
diff --git a/trunk/drivers/media/video/ivtv/ivtv-driver.h b/trunk/drivers/media/video/ivtv/ivtv-driver.h
index 552f04511ead..9a412d6c6d06 100644
--- a/trunk/drivers/media/video/ivtv/ivtv-driver.h
+++ b/trunk/drivers/media/video/ivtv/ivtv-driver.h
@@ -67,6 +67,14 @@
#include
+#ifdef CONFIG_LIRC_I2C
+# error "This driver is not compatible with the LIRC I2C kernel configuration option."
+#endif /* CONFIG_LIRC_I2C */
+
+#ifndef CONFIG_PCI
+# error "This driver requires kernel PCI support."
+#endif /* CONFIG_PCI */
+
#define IVTV_ENCODER_OFFSET 0x00000000
#define IVTV_ENCODER_SIZE 0x00800000 /* Last half isn't needed 0x01000000 */
diff --git a/trunk/drivers/media/video/ivtv/ivtv-ioctl.c b/trunk/drivers/media/video/ivtv/ivtv-ioctl.c
index 1989ec1cb973..794a6a02f82f 100644
--- a/trunk/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/trunk/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -362,6 +362,8 @@ static int ivtv_get_fmt(struct ivtv *itv, int streamtype, struct v4l2_format *fm
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT))
return -EINVAL;
+ fmt->fmt.pix.left = itv->main_rect.left;
+ fmt->fmt.pix.top = itv->main_rect.top;
fmt->fmt.pix.width = itv->main_rect.width;
fmt->fmt.pix.height = itv->main_rect.height;
fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
@@ -400,6 +402,8 @@ static int ivtv_get_fmt(struct ivtv *itv, int streamtype, struct v4l2_format *fm
break;
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+ fmt->fmt.pix.left = 0;
+ fmt->fmt.pix.top = 0;
fmt->fmt.pix.width = itv->params.width;
fmt->fmt.pix.height = itv->params.height;
fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
@@ -494,13 +498,15 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype,
if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT))
return -EINVAL;
field = fmt->fmt.pix.field;
- r.top = 0;
- r.left = 0;
+ r.top = fmt->fmt.pix.top;
+ r.left = fmt->fmt.pix.left;
r.width = fmt->fmt.pix.width;
r.height = fmt->fmt.pix.height;
ivtv_get_fmt(itv, streamtype, fmt);
if (itv->output_mode != OUT_UDMA_YUV) {
/* TODO: would setting the rect also be valid for this mode? */
+ fmt->fmt.pix.top = r.top;
+ fmt->fmt.pix.left = r.left;
fmt->fmt.pix.width = r.width;
fmt->fmt.pix.height = r.height;
}
@@ -1135,6 +1141,8 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
fb->fmt.pixelformat = itv->osd_pixelformat;
fb->fmt.width = itv->osd_rect.width;
fb->fmt.height = itv->osd_rect.height;
+ fb->fmt.left = itv->osd_rect.left;
+ fb->fmt.top = itv->osd_rect.top;
fb->base = (void *)itv->osd_video_pbase;
if (itv->osd_global_alpha_state)
fb->flags |= V4L2_FBUF_FLAG_GLOBAL_ALPHA;
diff --git a/trunk/drivers/media/video/ov7670.c b/trunk/drivers/media/video/ov7670.c
index 3ceb8a6249dd..03bc369a9e49 100644
--- a/trunk/drivers/media/video/ov7670.c
+++ b/trunk/drivers/media/video/ov7670.c
@@ -720,21 +720,11 @@ static int ov7670_s_fmt(struct i2c_client *c, struct v4l2_format *fmt)
struct ov7670_format_struct *ovfmt;
struct ov7670_win_size *wsize;
struct ov7670_info *info = i2c_get_clientdata(c);
- unsigned char com7, clkrc;
+ unsigned char com7;
ret = ov7670_try_fmt(c, fmt, &ovfmt, &wsize);
if (ret)
return ret;
- /*
- * HACK: if we're running rgb565 we need to grab then rewrite
- * CLKRC. If we're *not*, however, then rewriting clkrc hoses
- * the colors.
- */
- if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_RGB565) {
- ret = ov7670_read(c, REG_CLKRC, &clkrc);
- if (ret)
- return ret;
- }
/*
* COM7 is a pain in the ass, it doesn't like to be read then
* quickly written afterward. But we have everything we need
@@ -754,10 +744,7 @@ static int ov7670_s_fmt(struct i2c_client *c, struct v4l2_format *fmt)
if (wsize->regs)
ret = ov7670_write_array(c, wsize->regs);
info->fmt = ovfmt;
-
- if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_RGB565 && ret == 0)
- ret = ov7670_write(c, REG_CLKRC, clkrc);
- return ret;
+ return 0;
}
/*
@@ -1280,9 +1267,7 @@ static int ov7670_attach(struct i2c_adapter *adapter)
ret = ov7670_detect(client);
if (ret)
goto out_free_info;
- ret = i2c_attach_client(client);
- if (ret)
- goto out_free_info;
+ i2c_attach_client(client);
return 0;
out_free_info:
diff --git a/trunk/drivers/media/video/tuner-simple.c b/trunk/drivers/media/video/tuner-simple.c
index c40b92ce1fad..1b9b0742f753 100644
--- a/trunk/drivers/media/video/tuner-simple.c
+++ b/trunk/drivers/media/video/tuner-simple.c
@@ -205,13 +205,9 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
/* 0x01 -> ??? no change ??? */
/* 0x02 -> PAL BDGHI / SECAM L */
/* 0x04 -> ??? PAL others / SECAM others ??? */
- cb &= ~0x03;
- if (t->std & V4L2_STD_SECAM_L) //also valid for V4L2_STD_SECAM
- cb |= PHILIPS_MF_SET_PAL_L;
- else if (t->std & V4L2_STD_SECAM_LC)
- cb |= PHILIPS_MF_SET_PAL_L2;
- else /* V4L2_STD_B|V4L2_STD_GH */
- cb |= PHILIPS_MF_SET_BG;
+ cb &= ~0x02;
+ if (t->std & V4L2_STD_SECAM)
+ cb |= 0x02;
break;
case TUNER_TEMIC_4046FM5:
diff --git a/trunk/drivers/mfd/ucb1x00-ts.c b/trunk/drivers/mfd/ucb1x00-ts.c
index 7772bd1d92b4..cb8c264eaff0 100644
--- a/trunk/drivers/mfd/ucb1x00-ts.c
+++ b/trunk/drivers/mfd/ucb1x00-ts.c
@@ -207,7 +207,16 @@ static int ucb1x00_thread(void *_ts)
struct ucb1x00_ts *ts = _ts;
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
- int valid = 0;
+ int valid;
+
+ /*
+ * We could run as a real-time thread. However, thus far
+ * this doesn't seem to be necessary.
+ */
+// tsk->policy = SCHED_FIFO;
+// tsk->rt_priority = 1;
+
+ valid = 0;
add_wait_queue(&ts->irq_wait, &wait);
while (!kthread_should_stop()) {
diff --git a/trunk/drivers/net/usb/cdc_ether.c b/trunk/drivers/net/usb/cdc_ether.c
index 675ac99a79c6..5a21f06bf8a5 100644
--- a/trunk/drivers/net/usb/cdc_ether.c
+++ b/trunk/drivers/net/usb/cdc_ether.c
@@ -91,22 +91,6 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
"CDC descriptors on config\n");
}
- /* Maybe CDC descriptors are after the endpoint? This bug has
- * been seen on some 2Wire Inc RNDIS-ish products.
- */
- if (len == 0) {
- struct usb_host_endpoint *hep;
-
- hep = intf->cur_altsetting->endpoint;
- if (hep) {
- buf = hep->extra;
- len = hep->extralen;
- }
- if (len)
- dev_dbg(&intf->dev,
- "CDC descriptors on endpoint\n");
- }
-
/* this assumes that if there's a non-RNDIS vendor variant
* of cdc-acm, it'll fail RNDIS requests cleanly.
*/
diff --git a/trunk/drivers/net/usb/rndis_host.c b/trunk/drivers/net/usb/rndis_host.c
index cd991a0f75bb..980e4aaa97aa 100644
--- a/trunk/drivers/net/usb/rndis_host.c
+++ b/trunk/drivers/net/usb/rndis_host.c
@@ -515,7 +515,6 @@ static int rndis_bind(struct usbnet *dev, struct usb_interface *intf)
dev_err(&intf->dev,
"dev can't take %u byte packets (max %u)\n",
dev->hard_mtu, tmp);
- retval = -EINVAL;
goto fail_and_release;
}
diff --git a/trunk/drivers/net/usb/usbnet.c b/trunk/drivers/net/usb/usbnet.c
index 5b16d9a1269a..f9cd42d058b0 100644
--- a/trunk/drivers/net/usb/usbnet.c
+++ b/trunk/drivers/net/usb/usbnet.c
@@ -1252,23 +1252,20 @@ EXPORT_SYMBOL_GPL(usbnet_probe);
/*-------------------------------------------------------------------------*/
-/*
- * suspend the whole driver as soon as the first interface is suspended
- * resume only when the last interface is resumed
+/* FIXME these suspend/resume methods assume non-CDC style
+ * devices, with only one interface.
*/
int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
{
struct usbnet *dev = usb_get_intfdata(intf);
- if (!dev->suspend_count++) {
- /* accelerate emptying of the rx and queues, to avoid
- * having everything error out.
- */
- netif_device_detach (dev->net);
- (void) unlink_urbs (dev, &dev->rxq);
- (void) unlink_urbs (dev, &dev->txq);
- }
+ /* accelerate emptying of the rx and queues, to avoid
+ * having everything error out.
+ */
+ netif_device_detach (dev->net);
+ (void) unlink_urbs (dev, &dev->rxq);
+ (void) unlink_urbs (dev, &dev->txq);
return 0;
}
EXPORT_SYMBOL_GPL(usbnet_suspend);
@@ -1277,10 +1274,8 @@ int usbnet_resume (struct usb_interface *intf)
{
struct usbnet *dev = usb_get_intfdata(intf);
- if (!--dev->suspend_count) {
- netif_device_attach (dev->net);
- tasklet_schedule (&dev->bh);
- }
+ netif_device_attach (dev->net);
+ tasklet_schedule (&dev->bh);
return 0;
}
EXPORT_SYMBOL_GPL(usbnet_resume);
diff --git a/trunk/drivers/net/usb/usbnet.h b/trunk/drivers/net/usb/usbnet.h
index a3f8b9e7bc00..82db5a8e528e 100644
--- a/trunk/drivers/net/usb/usbnet.h
+++ b/trunk/drivers/net/usb/usbnet.h
@@ -32,7 +32,6 @@ struct usbnet {
const char *driver_name;
wait_queue_head_t *wait;
struct mutex phy_mutex;
- unsigned char suspend_count;
/* i/o info: pipes etc */
unsigned in, out;
diff --git a/trunk/drivers/usb/class/usblp.c b/trunk/drivers/usb/class/usblp.c
index 7b1edfe46b28..15e740e3a5c4 100644
--- a/trunk/drivers/usb/class/usblp.c
+++ b/trunk/drivers/usb/class/usblp.c
@@ -1003,7 +1003,7 @@ static int usblp_probe(struct usb_interface *intf,
usblp->writebuf, usblp->writeurb->transfer_dma);
if (usblp->readbuf)
usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
- usblp->readbuf, usblp->readurb->transfer_dma);
+ usblp->readbuf, usblp->writeurb->transfer_dma);
kfree(usblp->statusbuf);
kfree(usblp->device_id_string);
usb_free_urb(usblp->writeurb);
diff --git a/trunk/drivers/usb/core/config.c b/trunk/drivers/usb/core/config.c
index 2d4fd530e5e4..bfb3731d42db 100644
--- a/trunk/drivers/usb/core/config.c
+++ b/trunk/drivers/usb/core/config.c
@@ -185,12 +185,10 @@ static int usb_parse_interface(struct device *ddev, int cfgno,
num_ep = USB_MAXENDPOINTS;
}
- if (num_ep > 0) { /* Can't allocate 0 bytes */
- len = sizeof(struct usb_host_endpoint) * num_ep;
- alt->endpoint = kzalloc(len, GFP_KERNEL);
- if (!alt->endpoint)
- return -ENOMEM;
- }
+ len = sizeof(struct usb_host_endpoint) * num_ep;
+ alt->endpoint = kzalloc(len, GFP_KERNEL);
+ if (!alt->endpoint)
+ return -ENOMEM;
/* Parse all the endpoint descriptors */
n = 0;
diff --git a/trunk/drivers/usb/core/driver.c b/trunk/drivers/usb/core/driver.c
index 2619986e5300..b9f7f90aef82 100644
--- a/trunk/drivers/usb/core/driver.c
+++ b/trunk/drivers/usb/core/driver.c
@@ -983,10 +983,7 @@ static int autosuspend_check(struct usb_device *udev)
#else
-static inline int autosuspend_check(struct usb_device *udev)
-{
- return 0;
-}
+#define autosuspend_check(udev) 0
#endif /* CONFIG_USB_SUSPEND */
@@ -1044,6 +1041,7 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)
if (status < 0)
goto done;
}
+ cancel_delayed_work(&udev->autosuspend);
/* Suspend all the interfaces and then udev itself */
if (udev->actconfig) {
@@ -1064,16 +1062,9 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)
usb_resume_interface(intf);
}
- /* Try another autosuspend when the interfaces aren't busy */
- if (udev->auto_pm)
- autosuspend_check(udev);
-
/* If the suspend succeeded, propagate it up the tree */
- } else {
- cancel_delayed_work(&udev->autosuspend);
- if (parent)
- usb_autosuspend_device(parent);
- }
+ } else if (parent)
+ usb_autosuspend_device(parent);
done:
// dev_dbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
@@ -1484,7 +1475,6 @@ int usb_external_resume_device(struct usb_device *udev)
usb_pm_lock(udev);
udev->auto_pm = 0;
status = usb_resume_both(udev);
- udev->last_busy = jiffies;
usb_pm_unlock(udev);
/* Now that the device is awake, we can start trying to autosuspend
diff --git a/trunk/drivers/usb/core/hcd.c b/trunk/drivers/usb/core/hcd.c
index e277258df382..40cf882293e6 100644
--- a/trunk/drivers/usb/core/hcd.c
+++ b/trunk/drivers/usb/core/hcd.c
@@ -1018,8 +1018,8 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
atomic_dec (&urb->use_count);
if (urb->reject)
wake_up (&usb_kill_urb_queue);
- usbmon_urb_submit_error(&hcd->self, urb, status);
usb_put_urb (urb);
+ usbmon_urb_submit_error(&hcd->self, urb, status);
}
return status;
}
@@ -1175,6 +1175,10 @@ void usb_hcd_endpoint_disable (struct usb_device *udev,
struct urb *urb;
hcd = bus_to_hcd(udev->bus);
+
+ WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT &&
+ udev->state != USB_STATE_NOTATTACHED);
+
local_irq_disable ();
/* ep is already gone from udev->ep_{in,out}[]; no more submits */
diff --git a/trunk/drivers/usb/core/hub.c b/trunk/drivers/usb/core/hub.c
index caaa46f2dec7..f6b74a678de5 100644
--- a/trunk/drivers/usb/core/hub.c
+++ b/trunk/drivers/usb/core/hub.c
@@ -2201,9 +2201,14 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
continue;
}
- /* Retry on all errors; some devices are flakey.
- * 255 is for WUSB devices, we actually need to use
- * 512 (WUSB1.0[4.8.1]).
+ /* Use a short timeout the first time through,
+ * so that recalcitrant full-speed devices with
+ * 8- or 16-byte ep0-maxpackets won't slow things
+ * down tremendously by NAKing the unexpectedly
+ * early status stage. Also, retry on all errors;
+ * some devices are flakey.
+ * 255 is for WUSB devices, we actually need to use 512.
+ * WUSB1.0[4.8.1].
*/
for (j = 0; j < 3; ++j) {
buf->bMaxPacketSize0 = 0;
@@ -2211,7 +2216,7 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
USB_DT_DEVICE << 8, 0,
buf, GET_DESCRIPTOR_BUFSIZE,
- USB_CTRL_GET_TIMEOUT);
+ (i ? USB_CTRL_GET_TIMEOUT : 1000));
switch (buf->bMaxPacketSize0) {
case 8: case 16: case 32: case 64: case 255:
if (buf->bDescriptorType ==
@@ -2421,10 +2426,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
if (portchange & USB_PORT_STAT_C_CONNECTION) {
status = hub_port_debounce(hub, port1);
- if (status < 0) {
- if (printk_ratelimit())
- dev_err (hub_dev, "connect-debounce failed, "
- "port %d disabled\n", port1);
+ if (status < 0 && printk_ratelimit()) {
+ dev_err (hub_dev,
+ "connect-debounce failed, port %d disabled\n",
+ port1);
goto done;
}
portstatus = status;
diff --git a/trunk/drivers/usb/core/message.c b/trunk/drivers/usb/core/message.c
index f9fed34bf7d8..b7434787db5f 100644
--- a/trunk/drivers/usb/core/message.c
+++ b/trunk/drivers/usb/core/message.c
@@ -221,10 +221,15 @@ int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe,
if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
USB_ENDPOINT_XFER_INT) {
+ int interval;
+
+ if (usb_dev->speed == USB_SPEED_HIGH)
+ interval = 1 << min(15, ep->desc.bInterval - 1);
+ else
+ interval = ep->desc.bInterval;
pipe = (pipe & ~(3 << 30)) | (PIPE_INTERRUPT << 30);
usb_fill_int_urb(urb, usb_dev, pipe, data, len,
- usb_api_blocking_completion, NULL,
- ep->desc.bInterval);
+ usb_api_blocking_completion, NULL, interval);
} else
usb_fill_bulk_urb(urb, usb_dev, pipe, data, len,
usb_api_blocking_completion, NULL);
diff --git a/trunk/drivers/usb/core/sysfs.c b/trunk/drivers/usb/core/sysfs.c
index be37c863fdfb..e7c982377488 100644
--- a/trunk/drivers/usb/core/sysfs.c
+++ b/trunk/drivers/usb/core/sysfs.c
@@ -232,15 +232,12 @@ set_level(struct device *dev, struct device_attribute *attr,
int len = count;
char *cp;
int rc = 0;
- int old_autosuspend_disabled, old_autoresume_disabled;
cp = memchr(buf, '\n', count);
if (cp)
len = cp - buf;
usb_lock_device(udev);
- old_autosuspend_disabled = udev->autosuspend_disabled;
- old_autoresume_disabled = udev->autoresume_disabled;
/* Setting the flags without calling usb_pm_lock is a subject to
* races, but who cares...
@@ -266,10 +263,6 @@ set_level(struct device *dev, struct device_attribute *attr,
} else
rc = -EINVAL;
- if (rc) {
- udev->autosuspend_disabled = old_autosuspend_disabled;
- udev->autoresume_disabled = old_autoresume_disabled;
- }
usb_unlock_device(udev);
return (rc < 0 ? rc : count);
}
diff --git a/trunk/drivers/usb/core/usb.c b/trunk/drivers/usb/core/usb.c
index 80627b6a2bf9..18ddc5e67e39 100644
--- a/trunk/drivers/usb/core/usb.c
+++ b/trunk/drivers/usb/core/usb.c
@@ -205,11 +205,7 @@ struct device_type usb_device_type = {
static int ksuspend_usb_init(void)
{
- /* This workqueue is supposed to be both freezable and
- * singlethreaded. Its job doesn't justify running on more
- * than one CPU.
- */
- ksuspend_usb_wq = create_freezeable_workqueue("ksuspend_usbd");
+ ksuspend_usb_wq = create_singlethread_workqueue("ksuspend_usbd");
if (!ksuspend_usb_wq)
return -ENOMEM;
return 0;
diff --git a/trunk/drivers/usb/gadget/fsl_usb2_udc.c b/trunk/drivers/usb/gadget/fsl_usb2_udc.c
index 3ca2b3159f00..157054ea3978 100644
--- a/trunk/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/trunk/drivers/usb/gadget/fsl_usb2_udc.c
@@ -228,15 +228,13 @@ static int dr_controller_setup(struct fsl_udc *udc)
/* Config PHY interface */
portctrl = fsl_readl(&dr_regs->portsc1);
- portctrl &= ~(PORTSCX_PHY_TYPE_SEL & PORTSCX_PORT_WIDTH);
+ portctrl &= ~PORTSCX_PHY_TYPE_SEL;
switch (udc->phy_mode) {
case FSL_USB2_PHY_ULPI:
portctrl |= PORTSCX_PTS_ULPI;
break;
- case FSL_USB2_PHY_UTMI_WIDE:
- portctrl |= PORTSCX_PTW_16BIT;
- /* fall through */
case FSL_USB2_PHY_UTMI:
+ case FSL_USB2_PHY_UTMI_WIDE:
portctrl |= PORTSCX_PTS_UTMI;
break;
case FSL_USB2_PHY_SERIAL:
@@ -627,7 +625,7 @@ static void fsl_free_buffer(struct usb_ep *_ep, void *buf,
struct fsl_ep *ep;
if (!_ep)
- return;
+ return NULL;
ep = container_of(_ep, struct fsl_ep, ep);
diff --git a/trunk/drivers/usb/host/ohci-pci.c b/trunk/drivers/usb/host/ohci-pci.c
index ca62cb583221..79705609fd0c 100644
--- a/trunk/drivers/usb/host/ohci-pci.c
+++ b/trunk/drivers/usb/host/ohci-pci.c
@@ -137,7 +137,7 @@ static const struct pci_device_id ohci_pci_quirks[] = {
/* Toshiba portege 4000 */
.vendor = PCI_VENDOR_ID_AL,
.device = 0x5237,
- .subvendor = PCI_VENDOR_ID_TOSHIBA,
+ .subvendor = PCI_VENDOR_ID_TOSHIBA_2,
.subdevice = 0x0004,
.driver_data = (unsigned long) broken_suspend,
},
diff --git a/trunk/drivers/usb/host/pci-quirks.c b/trunk/drivers/usb/host/pci-quirks.c
index c225159ca3d3..20861650905e 100644
--- a/trunk/drivers/usb/host/pci-quirks.c
+++ b/trunk/drivers/usb/host/pci-quirks.c
@@ -44,7 +44,6 @@
#define EHCI_USBSTS 4 /* status register */
#define EHCI_USBSTS_HALTED (1 << 12) /* HCHalted bit */
#define EHCI_USBINTR 8 /* interrupt register */
-#define EHCI_CONFIGFLAG 0x40 /* configured flag register */
#define EHCI_USBLEGSUP 0 /* legacy support register */
#define EHCI_USBLEGSUP_BIOS (1 << 16) /* BIOS semaphore */
#define EHCI_USBLEGSUP_OS (1 << 24) /* OS semaphore */
@@ -217,7 +216,6 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
u32 hcc_params, val;
u8 offset, cap_length;
int count = 256/4;
- int tried_handoff = 0;
if (!mmio_resource_enabled(pdev, 0))
return;
@@ -275,7 +273,6 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
*/
msec = 5000;
while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) {
- tried_handoff = 1;
msleep(10);
msec -= 10;
pci_read_config_dword(pdev, offset, &cap);
@@ -295,12 +292,6 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
pci_write_config_dword(pdev,
offset + EHCI_USBLEGCTLSTS,
0);
-
- /* If the BIOS ever owned the controller then we
- * can't expect any power sessions to remain intact.
- */
- if (tried_handoff)
- writel(0, op_reg_base + EHCI_CONFIGFLAG);
break;
case 0: /* illegal reserved capability */
cap = 0;
diff --git a/trunk/drivers/usb/host/u132-hcd.c b/trunk/drivers/usb/host/u132-hcd.c
index e98df2ee9901..ff0dba01f1c7 100644
--- a/trunk/drivers/usb/host/u132-hcd.c
+++ b/trunk/drivers/usb/host/u132-hcd.c
@@ -57,13 +57,6 @@
#include
#include
#include "../core/hcd.h"
-
- /* FIXME ohci.h is ONLY for internal use by the OHCI driver.
- * If you're going to try stuff like this, you need to split
- * out shareable stuff (register declarations?) into its own
- * file, maybe name
- */
-
#include "ohci.h"
#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR
#define OHCI_INTR_INIT (OHCI_INTR_MIE | OHCI_INTR_UE | OHCI_INTR_RD | \
@@ -180,6 +173,11 @@ struct u132_ring {
struct u132_endp *curr_endp;
struct delayed_work scheduler;
};
+#define OHCI_QUIRK_AMD756 0x01
+#define OHCI_QUIRK_SUPERIO 0x02
+#define OHCI_QUIRK_INITRESET 0x04
+#define OHCI_BIG_ENDIAN 0x08
+#define OHCI_QUIRK_ZFMICRO 0x10
struct u132 {
struct kref kref;
struct list_head u132_list;
diff --git a/trunk/drivers/usb/misc/auerswald.c b/trunk/drivers/usb/misc/auerswald.c
index cac1500cba62..88fb56d5db8f 100644
--- a/trunk/drivers/usb/misc/auerswald.c
+++ b/trunk/drivers/usb/misc/auerswald.c
@@ -1822,10 +1822,16 @@ static int auerchar_release (struct inode *inode, struct file *file)
pauerswald_t cp;
dbg("release");
- down(&ccp->mutex);
+ /* get the mutexes */
+ if (down_interruptible (&ccp->mutex)) {
+ return -ERESTARTSYS;
+ }
cp = ccp->auerdev;
if (cp) {
- down(&cp->mutex);
+ if (down_interruptible (&cp->mutex)) {
+ up (&ccp->mutex);
+ return -ERESTARTSYS;
+ }
/* remove an open service */
auerswald_removeservice (cp, &ccp->scontext);
/* detach from device */
diff --git a/trunk/drivers/usb/misc/ftdi-elan.c b/trunk/drivers/usb/misc/ftdi-elan.c
index e0f122e131d7..e2172e5cf152 100644
--- a/trunk/drivers/usb/misc/ftdi-elan.c
+++ b/trunk/drivers/usb/misc/ftdi-elan.c
@@ -73,13 +73,6 @@ static struct list_head ftdi_static_list;
#include "usb_u132.h"
#include
#include "../core/hcd.h"
-
- /* FIXME ohci.h is ONLY for internal use by the OHCI driver.
- * If you're going to try stuff like this, you need to split
- * out shareable stuff (register declarations?) into its own
- * file, maybe name
- */
-
#include "../host/ohci.h"
/* Define these values to match your devices*/
#define USB_FTDI_ELAN_VENDOR_ID 0x0403
@@ -2307,7 +2300,10 @@ static int ftdi_elan_checkingPCI(struct usb_ftdi *ftdi)
offsetof(struct ohci_regs, member), 0, data);
#define ftdi_write_pcimem(ftdi, member, data) ftdi_elan_write_pcimem(ftdi, \
offsetof(struct ohci_regs, member), 0, data);
-
+#define OHCI_QUIRK_AMD756 0x01
+#define OHCI_QUIRK_SUPERIO 0x02
+#define OHCI_QUIRK_INITRESET 0x04
+#define OHCI_BIG_ENDIAN 0x08
#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR
#define OHCI_INTR_INIT (OHCI_INTR_MIE | OHCI_INTR_UE | OHCI_INTR_RD | \
OHCI_INTR_WDH)
diff --git a/trunk/drivers/usb/misc/ldusb.c b/trunk/drivers/usb/misc/ldusb.c
index 7bad49404762..11555bde655b 100644
--- a/trunk/drivers/usb/misc/ldusb.c
+++ b/trunk/drivers/usb/misc/ldusb.c
@@ -165,8 +165,6 @@ struct ld_usb {
size_t interrupt_in_endpoint_size;
int interrupt_in_running;
int interrupt_in_done;
- int buffer_overflow;
- spinlock_t rbsl;
char* interrupt_out_buffer;
struct usb_endpoint_descriptor* interrupt_out_endpoint;
@@ -232,12 +230,10 @@ static void ld_usb_interrupt_in_callback(struct urb *urb)
} else {
dbg_info(&dev->intf->dev, "%s: nonzero status received: %d\n",
__FUNCTION__, urb->status);
- spin_lock(&dev->rbsl);
goto resubmit; /* maybe we can recover */
}
}
- spin_lock(&dev->rbsl);
if (urb->actual_length > 0) {
next_ring_head = (dev->ring_head+1) % ring_buffer_size;
if (next_ring_head != dev->ring_tail) {
@@ -248,25 +244,21 @@ static void ld_usb_interrupt_in_callback(struct urb *urb)
dev->ring_head = next_ring_head;
dbg_info(&dev->intf->dev, "%s: received %d bytes\n",
__FUNCTION__, urb->actual_length);
- } else {
+ } else
dev_warn(&dev->intf->dev,
"Ring buffer overflow, %d bytes dropped\n",
urb->actual_length);
- dev->buffer_overflow = 1;
- }
}
resubmit:
/* resubmit if we're still running */
- if (dev->interrupt_in_running && !dev->buffer_overflow && dev->intf) {
+ if (dev->interrupt_in_running && dev->intf) {
retval = usb_submit_urb(dev->interrupt_in_urb, GFP_ATOMIC);
- if (retval) {
+ if (retval)
dev_err(&dev->intf->dev,
"usb_submit_urb failed (%d)\n", retval);
- dev->buffer_overflow = 1;
- }
}
- spin_unlock(&dev->rbsl);
+
exit:
dev->interrupt_in_done = 1;
wake_up_interruptible(&dev->read_wait);
@@ -338,7 +330,6 @@ static int ld_usb_open(struct inode *inode, struct file *file)
/* initialize in direction */
dev->ring_head = 0;
dev->ring_tail = 0;
- dev->buffer_overflow = 0;
usb_fill_int_urb(dev->interrupt_in_urb,
interface_to_usbdev(interface),
usb_rcvintpipe(interface_to_usbdev(interface),
@@ -448,7 +439,6 @@ static ssize_t ld_usb_read(struct file *file, char __user *buffer, size_t count,
size_t *actual_buffer;
size_t bytes_to_read;
int retval = 0;
- int rv;
dev = file->private_data;
@@ -470,10 +460,7 @@ static ssize_t ld_usb_read(struct file *file, char __user *buffer, size_t count,
}
/* wait for data */
- spin_lock_irq(&dev->rbsl);
if (dev->ring_head == dev->ring_tail) {
- dev->interrupt_in_done = 0;
- spin_unlock_irq(&dev->rbsl);
if (file->f_flags & O_NONBLOCK) {
retval = -EAGAIN;
goto unlock_exit;
@@ -481,8 +468,6 @@ static ssize_t ld_usb_read(struct file *file, char __user *buffer, size_t count,
retval = wait_event_interruptible(dev->read_wait, dev->interrupt_in_done);
if (retval < 0)
goto unlock_exit;
- } else {
- spin_unlock_irq(&dev->rbsl);
}
/* actual_buffer contains actual_length + interrupt_in_buffer */
@@ -501,17 +486,6 @@ static ssize_t ld_usb_read(struct file *file, char __user *buffer, size_t count,
retval = bytes_to_read;
- spin_lock_irq(&dev->rbsl);
- if (dev->buffer_overflow) {
- dev->buffer_overflow = 0;
- spin_unlock_irq(&dev->rbsl);
- rv = usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL);
- if (rv < 0)
- dev->buffer_overflow = 1;
- } else {
- spin_unlock_irq(&dev->rbsl);
- }
-
unlock_exit:
/* unlock the device */
up(&dev->sem);
@@ -661,7 +635,6 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id *
goto exit;
}
init_MUTEX(&dev->sem);
- spin_lock_init(&dev->rbsl);
dev->intf = intf;
init_waitqueue_head(&dev->read_wait);
init_waitqueue_head(&dev->write_wait);
diff --git a/trunk/drivers/usb/serial/ark3116.c b/trunk/drivers/usb/serial/ark3116.c
index fe437125f14b..ea2175bb2274 100644
--- a/trunk/drivers/usb/serial/ark3116.c
+++ b/trunk/drivers/usb/serial/ark3116.c
@@ -63,8 +63,7 @@ static inline void ARK3116_RCV(struct usb_serial *serial, int seq,
request, requesttype, value, index,
buf, 0x0000001, 1000);
if (result)
- dbg("%03d < %d bytes [0x%02X]", seq, result,
- ((unsigned char *)buf)[0]);
+ dbg("%03d < %d bytes [0x%02X]", seq, result, buf[0]);
else
dbg("%03d < 0 bytes", seq);
}
diff --git a/trunk/drivers/usb/serial/ftdi_sio.c b/trunk/drivers/usb/serial/ftdi_sio.c
index 2353679f601e..95a1805b064f 100644
--- a/trunk/drivers/usb/serial/ftdi_sio.c
+++ b/trunk/drivers/usb/serial/ftdi_sio.c
@@ -273,18 +273,12 @@ static __u16 product;
/* struct ftdi_sio_quirk is used by devices requiring special attention. */
struct ftdi_sio_quirk {
- int (*probe)(struct usb_serial *);
void (*setup)(struct usb_serial *); /* Special settings during startup. */
};
-static int ftdi_olimex_probe (struct usb_serial *serial);
static void ftdi_USB_UIRT_setup (struct usb_serial *serial);
static void ftdi_HE_TIRA1_setup (struct usb_serial *serial);
-static struct ftdi_sio_quirk ftdi_olimex_quirk = {
- .probe = ftdi_olimex_probe,
-};
-
static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = {
.setup = ftdi_USB_UIRT_setup,
};
@@ -325,7 +319,6 @@ static struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
- { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) },
{ USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
{ USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) },
@@ -532,9 +525,6 @@ static struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13U_PID) },
{ USB_DEVICE(ELEKTOR_VID, ELEKTOR_FT323R_PID) },
{ USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) },
- { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) },
- { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID),
- .driver_info = (kernel_ulong_t)&ftdi_olimex_quirk },
{ }, /* Optional parameter entry */
{ } /* Terminating entry */
};
@@ -679,7 +669,7 @@ static struct usb_serial_driver ftdi_sio_device = {
/*
* ***************************************************************************
- * Utility functions
+ * Utlity functions
* ***************************************************************************
*/
@@ -1181,17 +1171,9 @@ static void remove_sysfs_attrs(struct usb_serial_port *port)
/* Probe function to check for special devices */
static int ftdi_sio_probe (struct usb_serial *serial, const struct usb_device_id *id)
{
- struct ftdi_sio_quirk *quirk = (struct ftdi_sio_quirk *)id->driver_info;
-
- if (quirk && quirk->probe) {
- int ret = quirk->probe(serial);
- if (ret != 0)
- return ret;
- }
-
usb_set_serial_data(serial, (void *)id->driver_info);
- return 0;
+ return (0);
}
static int ftdi_sio_port_probe(struct usb_serial_port *port)
@@ -1286,24 +1268,6 @@ static void ftdi_HE_TIRA1_setup (struct usb_serial *serial)
priv->force_rtscts = 1;
} /* ftdi_HE_TIRA1_setup */
-/*
- * First port on Olimex arm-usb-ocd is reserved for JTAG interface
- * and can be accessed from userspace using openocd.
- */
-static int ftdi_olimex_probe(struct usb_serial *serial)
-{
- struct usb_device *udev = serial->dev;
- struct usb_interface *interface = serial->interface;
-
- dbg("%s",__FUNCTION__);
-
- if (interface == udev->actconfig->interface[0]) {
- info("Ignoring reserved serial port on Olimex arm-usb-ocd\n");
- return -ENODEV;
- }
-
- return 0;
-}
/* ftdi_shutdown is called from usbserial:usb_serial_disconnect
* it is called when the usb device is disconnected
diff --git a/trunk/drivers/usb/serial/ftdi_sio.h b/trunk/drivers/usb/serial/ftdi_sio.h
index 33aee9047242..77ad0a09b384 100644
--- a/trunk/drivers/usb/serial/ftdi_sio.h
+++ b/trunk/drivers/usb/serial/ftdi_sio.h
@@ -60,9 +60,6 @@
/* DMX4ALL DMX Interfaces */
#define FTDI_DMX4ALL 0xC850
-/* OpenDCC (www.opendcc.de) product id */
-#define FTDI_OPENDCC_PID 0xBFD8
-
/* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */
/* they use the ftdi chipset for the USB interface and the vendor id is the same */
#define FTDI_XF_632_PID 0xFC08 /* 632: 16x2 Character Display */
@@ -521,15 +518,6 @@
#define FTDI_IBS_PEDO_PID 0xff3e /* IBS PEDO-Modem (RF modem 868.35 MHz) */
#define FTDI_IBS_PROD_PID 0xff3f /* future device */
-/*
- * MaxStream devices www.maxstream.net
- */
-#define FTDI_MAXSTREAM_PID 0xEE18 /* Xbee PKG-U Module */
-
-/* Olimex */
-#define OLIMEX_VID 0x15BA
-#define OLIMEX_ARM_USB_OCD_PID 0x0003
-
/* Commands */
#define FTDI_SIO_RESET 0 /* Reset the port */
#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */
diff --git a/trunk/drivers/usb/serial/mos7840.c b/trunk/drivers/usb/serial/mos7840.c
index 36620c651079..2366e7b63ece 100644
--- a/trunk/drivers/usb/serial/mos7840.c
+++ b/trunk/drivers/usb/serial/mos7840.c
@@ -769,6 +769,11 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
return;
}
+ if (!mos7840_port) {
+ dbg("%s", "NULL mos7840_port pointer \n");
+ return;
+ }
+
if (mos7840_port_paranoia_check(mos7840_port->port, __FUNCTION__)) {
dbg("%s", "Port Paranoia failed \n");
return;
diff --git a/trunk/drivers/usb/serial/omninet.c b/trunk/drivers/usb/serial/omninet.c
index 00afc1712c39..4adfab988e86 100644
--- a/trunk/drivers/usb/serial/omninet.c
+++ b/trunk/drivers/usb/serial/omninet.c
@@ -165,10 +165,12 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
{
struct usb_serial *serial = port->serial;
struct usb_serial_port *wport;
+ struct omninet_data *od = usb_get_serial_port_data(port);
int result = 0;
dbg("%s - port %d", __FUNCTION__, port->number);
+ od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
wport = serial->port[1];
wport->tty = port->tty;
diff --git a/trunk/drivers/usb/serial/option.c b/trunk/drivers/usb/serial/option.c
index 89f067d95076..8c3f55b080b4 100644
--- a/trunk/drivers/usb/serial/option.c
+++ b/trunk/drivers/usb/serial/option.c
@@ -165,6 +165,7 @@ static struct usb_device_id option_ids[] = {
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1410) }, /* Novatel U740 */
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1420) }, /* Novatel EU870 */
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1430) }, /* Novatel Merlin XU870 HSDPA/3G */
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1430) }, /* Novatel XU870 */
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2100) }, /* Novatel EV620 CDMA/EV-DO */
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2110) }, /* Novatel Merlin ES620 / Merlin ES720 / Ovation U720 */
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */
diff --git a/trunk/drivers/usb/serial/sierra.c b/trunk/drivers/usb/serial/sierra.c
index ac1829c6e8f0..644607de4c11 100644
--- a/trunk/drivers/usb/serial/sierra.c
+++ b/trunk/drivers/usb/serial/sierra.c
@@ -35,7 +35,6 @@ static struct usb_device_id id_table [] = {
{ USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */
{ USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */
{ USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */
- { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */
{ USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */
{ USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */
{ USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */
@@ -61,7 +60,6 @@ static struct usb_device_id id_table_3port [] = {
{ USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */
{ USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */
{ USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */
- { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless AirCard 595U */
{ USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */
{ USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */
{ USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */
diff --git a/trunk/drivers/usb/storage/onetouch.c b/trunk/drivers/usb/storage/onetouch.c
index d35369392fed..6d3dad3d1dae 100644
--- a/trunk/drivers/usb/storage/onetouch.c
+++ b/trunk/drivers/usb/storage/onetouch.c
@@ -84,7 +84,7 @@ static void usb_onetouch_irq(struct urb *urb)
static int usb_onetouch_open(struct input_dev *dev)
{
- struct usb_onetouch *onetouch = input_get_drvdata(dev);
+ struct usb_onetouch *onetouch = dev->private;
onetouch->is_open = 1;
onetouch->irq->dev = onetouch->udev;
@@ -98,7 +98,7 @@ static int usb_onetouch_open(struct input_dev *dev)
static void usb_onetouch_close(struct input_dev *dev)
{
- struct usb_onetouch *onetouch = input_get_drvdata(dev);
+ struct usb_onetouch *onetouch = dev->private;
usb_kill_urb(onetouch->irq);
onetouch->is_open = 0;
@@ -185,14 +185,13 @@ int onetouch_connect_input(struct us_data *ss)
input_dev->name = onetouch->name;
input_dev->phys = onetouch->phys;
usb_to_input_id(udev, &input_dev->id);
- input_dev->dev.parent = &udev->dev;
+ input_dev->cdev.dev = &udev->dev;
set_bit(EV_KEY, input_dev->evbit);
set_bit(ONETOUCH_BUTTON, input_dev->keybit);
clear_bit(0, input_dev->keybit);
- input_set_drvdata(input_dev, onetouch);
-
+ input_dev->private = onetouch;
input_dev->open = usb_onetouch_open;
input_dev->close = usb_onetouch_close;
diff --git a/trunk/drivers/usb/storage/unusual_devs.h b/trunk/drivers/usb/storage/unusual_devs.h
index d230ee72f9cd..8b3145ab7757 100644
--- a/trunk/drivers/usb/storage/unusual_devs.h
+++ b/trunk/drivers/usb/storage/unusual_devs.h
@@ -1179,20 +1179,14 @@ UNUSUAL_DEV( 0x0a17, 0x006, 0x0000, 0xffff,
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_INQUIRY ),
-/* These are virtual windows driver CDs, which the zd1211rw driver automatically
- * converts into a WLAN devices. */
+/* This is a virtual windows driver CD, which the zd1211rw driver automatically
+ * converts into a WLAN device. */
UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101,
"ZyXEL",
"G-220F USB-WLAN Install",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_IGNORE_DEVICE ),
-UNUSUAL_DEV( 0x0ace, 0x20ff, 0x0101, 0x0101,
- "SiteCom",
- "WL-117 USB-WLAN Install",
- US_SC_DEVICE, US_PR_DEVICE, NULL,
- US_FL_IGNORE_DEVICE ),
-
#ifdef CONFIG_USB_STORAGE_ISD200
UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110,
"ATI",
diff --git a/trunk/fs/Kconfig.binfmt b/trunk/fs/Kconfig.binfmt
index d4fc6095466d..74c64409ddbc 100644
--- a/trunk/fs/Kconfig.binfmt
+++ b/trunk/fs/Kconfig.binfmt
@@ -38,7 +38,7 @@ config BINFMT_ELF_FDPIC
config BINFMT_FLAT
tristate "Kernel support for flat binaries"
- depends on !MMU
+ depends on !MMU || SUPERH
help
Support uClinux FLAT format binaries.
diff --git a/trunk/include/asm-ia64/unistd.h b/trunk/include/asm-ia64/unistd.h
index 441c9e001776..d7781a2ddefe 100644
--- a/trunk/include/asm-ia64/unistd.h
+++ b/trunk/include/asm-ia64/unistd.h
@@ -305,19 +305,6 @@
#define NR_syscalls 286 /* length of syscall table */
-/*
- * The following defines stop scripts/checksyscalls.sh from complaining about
- * unimplemented system calls. Glibc provides for each of these by using
- * more modern equivalent system calls.
- */
-#define __IGNORE_fork /* clone() */
-#define __IGNORE_time /* gettimeofday() */
-#define __IGNORE_alarm /* setitimer(ITIMER_REAL, ... */
-#define __IGNORE_pause /* rt_sigprocmask(), rt_sigsuspend() */
-#define __IGNORE_utime /* utimes() */
-#define __IGNORE_getpgrp /* getpgid() */
-#define __IGNORE_vfork /* clone() */
-
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
diff --git a/trunk/include/asm-sh/dreamcast/sysasic.h b/trunk/include/asm-sh/dreamcast/sysasic.h
index f33426608a87..7874e3dac736 100644
--- a/trunk/include/asm-sh/dreamcast/sysasic.h
+++ b/trunk/include/asm-sh/dreamcast/sysasic.h
@@ -23,7 +23,7 @@
takes.
*/
-#define HW_EVENT_IRQ_BASE 48
+#define HW_EVENT_IRQ_BASE OFFCHIP_IRQ_BASE /* 48 */
/* IRQ 13 */
#define HW_EVENT_VSYNC (HW_EVENT_IRQ_BASE + 5) /* VSync */
diff --git a/trunk/include/asm-sh/kdebug.h b/trunk/include/asm-sh/kdebug.h
index 382cfc7deb73..16578b7c9da1 100644
--- a/trunk/include/asm-sh/kdebug.h
+++ b/trunk/include/asm-sh/kdebug.h
@@ -6,6 +6,10 @@
/* Grossly misnamed. */
enum die_val {
DIE_TRAP,
+ DIE_PAGE_FAULT,
};
+int register_page_fault_notifier(struct notifier_block *nb);
+int unregister_page_fault_notifier(struct notifier_block *nb);
+
#endif /* __ASM_SH_KDEBUG_H */
diff --git a/trunk/include/asm-sh/landisk/gio.h b/trunk/include/asm-sh/landisk/gio.h
index 35d7368b718a..3fce4c451a46 100644
--- a/trunk/include/asm-sh/landisk/gio.h
+++ b/trunk/include/asm-sh/landisk/gio.h
@@ -29,8 +29,16 @@
#define GIODRV_IOCGGIODATA4 _IOR(GIODRV_IOC_MAGIC, 6, unsigned long *)
#define GIODRV_IOCSGIOSETADDR _IOW(GIODRV_IOC_MAGIC, 7, unsigned long *)
#define GIODRV_IOCHARDRESET _IO(GIODRV_IOC_MAGIC, 8) /* debugging tool */
-#define GIODRV_IOC_MAXNR 8
+#define GIODRV_IOCSGIO_LED _IOW(GIODRV_IOC_MAGIC, 9, unsigned long *)
+#define GIODRV_IOCGGIO_LED _IOR(GIODRV_IOC_MAGIC, 10, unsigned long *)
+#define GIODRV_IOCSGIO_BUZZER _IOW(GIODRV_IOC_MAGIC, 11, unsigned long *)
+#define GIODRV_IOCGGIO_LANDISK _IOR(GIODRV_IOC_MAGIC, 14, unsigned long *)
+#define GIODRV_IOCGGIO_BTN _IOR(GIODRV_IOC_MAGIC, 22, unsigned long *)
+#define GIODRV_IOCSGIO_BTNPID _IOW(GIODRV_IOC_MAGIC, 23, unsigned long *)
+#define GIODRV_IOCGGIO_BTNPID _IOR(GIODRV_IOC_MAGIC, 24, unsigned long *)
+
+#define GIODRV_IOC_MAXNR 8
#define GIO_READ 0x00000000
#define GIO_WRITE 0x00000001
diff --git a/trunk/include/asm-sh/landisk/iodata_landisk.h b/trunk/include/asm-sh/landisk/iodata_landisk.h
index 6fb04ab38b9f..c74d3c73f377 100644
--- a/trunk/include/asm-sh/landisk/iodata_landisk.h
+++ b/trunk/include/asm-sh/landisk/iodata_landisk.h
@@ -22,6 +22,16 @@
/* 2003.10.31 I-O DATA NSD NWG add. for shutdown port clear */
#define PA_PWRINT_CLR 0xb0000006 /* Shutdown Interrupt clear Register */
+#define PA_LCD_CLRDSP 0x00 /* LCD Clear Display Offset */
+#define PA_LCD_RTNHOME 0x00 /* LCD Return Home Offset */
+#define PA_LCD_ENTMODE 0x00 /* LCD Entry Mode Offset */
+#define PA_LCD_DSPCTL 0x00 /* LCD Display ON/OFF Control Offset */
+#define PA_LCD_FUNC 0x00 /* LCD Function Set Offset */
+#define PA_LCD_CGRAM 0x00 /* LCD Set CGRAM Address Offset */
+#define PA_LCD_DDRAM 0x00 /* LCD Set DDRAM Address Offset */
+#define PA_LCD_RDFLAG 0x01 /* LCD Read Busy Flag Offset */
+#define PA_LCD_WTDATA 0x02 /* LCD Write Datat to RAM Offset */
+#define PA_LCD_RDDATA 0x03 /* LCD Read Data from RAM Offset */
#define PA_PIDE_OFFSET 0x40 /* CF IDE Offset */
#define PA_SIDE_OFFSET 0x40 /* HDD IDE Offset */
@@ -35,6 +45,33 @@
#define IRQ_BUTTON 12 /* USL-5P Button IRQ */
#define IRQ_FAULT 13 /* USL-5P Fault IRQ */
+#define SHUTDOWN_BTN_MAJOR 99 /* Shutdown button device major no. */
+
+#define SHUTDOWN_LOOP_CNT 5 /* Shutdown button Detection loop */
+#define SHUTDOWN_DELAY 200 /* Shutdown button delay value(ms) */
+
+
+/* added by kogiidena */
+/*
+ * landisk_ledparam
+ *
+ * led ------10 -6543210 -6543210 -6543210
+ * |000000..|0.......|0.......|U.......|
+ * | HARD |fastblik| blink | on |
+ *
+ * led0: power U:update flag
+ * led1: error
+ * led2: usb1
+ * led3: usb2
+ * led4: usb3
+ * led5: usb4
+ * led6: usb5
+ *
+ */
+extern int landisk_ledparam; /* from setup.c */
+extern int landisk_buzzerparam; /* from setup.c */
+extern int landisk_arch; /* from setup.c */
+
#define __IO_PREFIX landisk
#include
diff --git a/trunk/include/asm-sh/unistd.h b/trunk/include/asm-sh/unistd.h
index 77bcb09d6ac8..af71e379a5ee 100644
--- a/trunk/include/asm-sh/unistd.h
+++ b/trunk/include/asm-sh/unistd.h
@@ -329,11 +329,8 @@
#define __NR_getcpu 318
#define __NR_epoll_pwait 319
#define __NR_utimensat 320
-#define __NR_signalfd 321
-#define __NR_timerfd 322
-#define __NR_eventfd 323
-#define NR_syscalls 324
+#define NR_syscalls 321
#ifdef __KERNEL__
diff --git a/trunk/include/linux/videodev2.h b/trunk/include/linux/videodev2.h
index e7560389079c..a25c2afa67e1 100644
--- a/trunk/include/linux/videodev2.h
+++ b/trunk/include/linux/videodev2.h
@@ -267,6 +267,8 @@ struct v4l2_pix_format
__u32 sizeimage;
enum v4l2_colorspace colorspace;
__u32 priv; /* private data, depends on pixelformat */
+ __u32 left; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */
+ __u32 top; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */
};
/* Pixel format FOURCC depth Description */
diff --git a/trunk/net/xfrm/xfrm_algo.c b/trunk/net/xfrm/xfrm_algo.c
index 8a72def25a34..5ced62c19c63 100644
--- a/trunk/net/xfrm/xfrm_algo.c
+++ b/trunk/net/xfrm/xfrm_algo.c
@@ -407,27 +407,27 @@ static struct xfrm_algo_desc *xfrm_find_algo(
static int xfrm_alg_id_match(const struct xfrm_algo_desc *entry,
const void *data)
{
- return entry->desc.sadb_alg_id == (int)data;
+ return entry->desc.sadb_alg_id == (unsigned long)data;
}
struct xfrm_algo_desc *xfrm_aalg_get_byid(int alg_id)
{
return xfrm_find_algo(&xfrm_aalg_list, xfrm_alg_id_match,
- (void *)alg_id, 1);
+ (void *)(unsigned long)alg_id, 1);
}
EXPORT_SYMBOL_GPL(xfrm_aalg_get_byid);
struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id)
{
return xfrm_find_algo(&xfrm_ealg_list, xfrm_alg_id_match,
- (void *)alg_id, 1);
+ (void *)(unsigned long)alg_id, 1);
}
EXPORT_SYMBOL_GPL(xfrm_ealg_get_byid);
struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id)
{
return xfrm_find_algo(&xfrm_calg_list, xfrm_alg_id_match,
- (void *)alg_id, 1);
+ (void *)(unsigned long)alg_id, 1);
}
EXPORT_SYMBOL_GPL(xfrm_calg_get_byid);