Merge remote-tracking branch 'common/android-3.0' into msm-3.0
* common/android-3.0: (570 commits) misc: remove kernel debugger core ARM: common: fiq_debugger: dump sysrq directly to console if enabled ARM: common: fiq_debugger: add irq context debug functions net: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT net: wireless: bcmdhd: Call init_ioctl() only if was started properly net: wireless: bcmdhd: Fix possible memory leak in escan/iscan cpufreq: interactive governor: default 20ms timer cpufreq: interactive governor: go to intermediate hi speed before max cpufreq: interactive governor: scale to max only if at min speed cpufreq: interactive governor: apply intermediate load on current speed ARM: idle: update idle ticks before call idle end notifier input: gpio_input: don't print debounce message unless flag is set net: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down net: wireless: bcmdhd: Improve suspend/resume processing net: wireless: bcmdhd: Check if FW is Ok for internal FW call tcp: Don't nuke connections for the wrong protocol ARM: common: fiq_debugger: make uart irq be no_suspend net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT mm: avoid livelock on !__GFP_FS allocations ... Conflicts: arch/arm/mm/cache-l2x0.c arch/arm/vfp/vfpmodule.c drivers/mmc/core/host.c kernel/power/wakelock.c net/bluetooth/hci_event.c Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
This commit is contained in:
@@ -381,7 +381,7 @@ static int evdev_fetch_next_event(struct evdev_client *client,
|
||||
|
||||
spin_lock_irq(&client->buffer_lock);
|
||||
|
||||
have_event = client->head != client->tail;
|
||||
have_event = client->packet_head != client->tail;
|
||||
if (have_event) {
|
||||
*event = client->buffer[client->tail++];
|
||||
client->tail &= client->bufsize - 1;
|
||||
@@ -405,14 +405,12 @@ static ssize_t evdev_read(struct file *file, char __user *buffer,
|
||||
if (count < input_event_size())
|
||||
return -EINVAL;
|
||||
|
||||
if (client->packet_head == client->tail && evdev->exist &&
|
||||
(file->f_flags & O_NONBLOCK))
|
||||
return -EAGAIN;
|
||||
|
||||
retval = wait_event_interruptible(evdev->wait,
|
||||
client->packet_head != client->tail || !evdev->exist);
|
||||
if (retval)
|
||||
return retval;
|
||||
if (!(file->f_flags & O_NONBLOCK)) {
|
||||
retval = wait_event_interruptible(evdev->wait,
|
||||
client->packet_head != client->tail || !evdev->exist);
|
||||
if (retval)
|
||||
return retval;
|
||||
}
|
||||
|
||||
if (!evdev->exist)
|
||||
return -ENODEV;
|
||||
@@ -426,6 +424,8 @@ static ssize_t evdev_read(struct file *file, char __user *buffer,
|
||||
retval += input_event_size();
|
||||
}
|
||||
|
||||
if (retval == 0 && file->f_flags & O_NONBLOCK)
|
||||
retval = -EAGAIN;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,10 +82,11 @@ static enum hrtimer_restart gpio_event_input_timer_func(struct hrtimer *timer)
|
||||
if (key_state->debounce & DEBOUNCE_UNSTABLE) {
|
||||
debounce = key_state->debounce = DEBOUNCE_UNKNOWN;
|
||||
enable_irq(gpio_to_irq(key_entry->gpio));
|
||||
pr_info("gpio_keys_scan_keys: key %x-%x, %d "
|
||||
"(%d) continue debounce\n",
|
||||
ds->info->type, key_entry->code,
|
||||
i, key_entry->gpio);
|
||||
if (gpio_flags & GPIOEDF_PRINT_KEY_UNSTABLE)
|
||||
pr_info("gpio_keys_scan_keys: key %x-%x, %d "
|
||||
"(%d) continue debounce\n",
|
||||
ds->info->type, key_entry->code,
|
||||
i, key_entry->gpio);
|
||||
}
|
||||
npolarity = !(gpio_flags & GPIOEDF_ACTIVE_HIGH);
|
||||
pressed = gpio_get_value(key_entry->gpio) ^ npolarity;
|
||||
@@ -227,13 +228,25 @@ static int gpio_event_input_request_irqs(struct gpio_input_state *ds)
|
||||
ds->info->keymap[i].gpio, irq);
|
||||
goto err_request_irq_failed;
|
||||
}
|
||||
enable_irq_wake(irq);
|
||||
if (ds->info->info.no_suspend) {
|
||||
err = enable_irq_wake(irq);
|
||||
if (err) {
|
||||
pr_err("gpio_event_input_request_irqs: "
|
||||
"enable_irq_wake failed for input %d, "
|
||||
"irq %d\n",
|
||||
ds->info->keymap[i].gpio, irq);
|
||||
goto err_enable_irq_wake_failed;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
for (i = ds->info->keymap_size - 1; i >= 0; i--) {
|
||||
free_irq(gpio_to_irq(ds->info->keymap[i].gpio),
|
||||
&ds->key_state[i]);
|
||||
irq = gpio_to_irq(ds->info->keymap[i].gpio);
|
||||
if (ds->info->info.no_suspend)
|
||||
disable_irq_wake(irq);
|
||||
err_enable_irq_wake_failed:
|
||||
free_irq(irq, &ds->key_state[i]);
|
||||
err_request_irq_failed:
|
||||
err_gpio_get_irq_num_failed:
|
||||
;
|
||||
@@ -341,8 +354,10 @@ int gpio_event_input_func(struct gpio_event_input_devs *input_devs,
|
||||
hrtimer_cancel(&ds->timer);
|
||||
if (ds->use_irq) {
|
||||
for (i = di->keymap_size - 1; i >= 0; i--) {
|
||||
free_irq(gpio_to_irq(di->keymap[i].gpio),
|
||||
&ds->key_state[i]);
|
||||
int irq = gpio_to_irq(di->keymap[i].gpio);
|
||||
if (ds->info->info.no_suspend)
|
||||
disable_irq_wake(irq);
|
||||
free_irq(irq, &ds->key_state[i]);
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&ds->irq_lock, irqflags);
|
||||
|
||||
Reference in New Issue
Block a user