mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 17:54:13 +08:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: staging: udlfb: Add vmalloc.h include staging: remove aten2011 driver Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value from task_struct to mm_struct" Staging: serqt_usb2: fix memory leak in error case Staging: serqt_usb2: add missing calls to tty_kref_put()
This commit is contained in:
commit
b7ebbb77f1
@ -103,8 +103,6 @@ source "drivers/staging/pohmelfs/Kconfig"
|
||||
|
||||
source "drivers/staging/stlc45xx/Kconfig"
|
||||
|
||||
source "drivers/staging/uc2322/Kconfig"
|
||||
|
||||
source "drivers/staging/b3dfg/Kconfig"
|
||||
|
||||
source "drivers/staging/phison/Kconfig"
|
||||
|
@ -34,7 +34,6 @@ obj-$(CONFIG_ANDROID) += android/
|
||||
obj-$(CONFIG_DST) += dst/
|
||||
obj-$(CONFIG_POHMELFS) += pohmelfs/
|
||||
obj-$(CONFIG_STLC45XX) += stlc45xx/
|
||||
obj-$(CONFIG_USB_SERIAL_ATEN2011) += uc2322/
|
||||
obj-$(CONFIG_B3DFG) += b3dfg/
|
||||
obj-$(CONFIG_IDE_PHISON) += phison/
|
||||
obj-$(CONFIG_PLAN9AUTH) += p9auth/
|
||||
|
@ -96,19 +96,21 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
|
||||
|
||||
read_lock(&tasklist_lock);
|
||||
for_each_process(p) {
|
||||
struct mm_struct *mm;
|
||||
int oom_adj;
|
||||
|
||||
task_lock(p);
|
||||
if (!p->mm) {
|
||||
mm = p->mm;
|
||||
if (!mm) {
|
||||
task_unlock(p);
|
||||
continue;
|
||||
}
|
||||
oom_adj = p->oomkilladj;
|
||||
oom_adj = mm->oom_adj;
|
||||
if (oom_adj < min_adj) {
|
||||
task_unlock(p);
|
||||
continue;
|
||||
}
|
||||
tasksize = get_mm_rss(p->mm);
|
||||
tasksize = get_mm_rss(mm);
|
||||
task_unlock(p);
|
||||
if (tasksize <= 0)
|
||||
continue;
|
||||
|
@ -360,18 +360,18 @@ static void qt_read_bulk_callback(struct urb *urb)
|
||||
if (port_paranoia_check(port, __func__) != 0) {
|
||||
dbg("%s - port_paranoia_check, exiting\n", __func__);
|
||||
qt_port->ReadBulkStopped = 1;
|
||||
return;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!serial) {
|
||||
dbg("%s - bad serial pointer, exiting\n", __func__);
|
||||
return;
|
||||
goto exit;
|
||||
}
|
||||
if (qt_port->closePending == 1) {
|
||||
/* Were closing , stop reading */
|
||||
dbg("%s - (qt_port->closepending == 1\n", __func__);
|
||||
qt_port->ReadBulkStopped = 1;
|
||||
return;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -381,7 +381,7 @@ static void qt_read_bulk_callback(struct urb *urb)
|
||||
*/
|
||||
if (qt_port->RxHolding == 1) {
|
||||
qt_port->ReadBulkStopped = 1;
|
||||
return;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (urb->status) {
|
||||
@ -389,7 +389,7 @@ static void qt_read_bulk_callback(struct urb *urb)
|
||||
|
||||
dbg("%s - nonzero read bulk status received: %d\n",
|
||||
__func__, urb->status);
|
||||
return;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (tty && RxCount) {
|
||||
@ -463,6 +463,8 @@ static void qt_read_bulk_callback(struct urb *urb)
|
||||
}
|
||||
|
||||
schedule_work(&port->work);
|
||||
exit:
|
||||
tty_kref_put(tty);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -736,6 +738,11 @@ static int qt_startup(struct usb_serial *serial)
|
||||
if (!qt_port) {
|
||||
dbg("%s: kmalloc for quatech_port (%d) failed!.",
|
||||
__func__, i);
|
||||
for(--i; i >= 0; i--) {
|
||||
port = serial->port[i];
|
||||
kfree(usb_get_serial_port_data(port));
|
||||
usb_set_serial_port_data(port, NULL);
|
||||
}
|
||||
return -ENOMEM;
|
||||
}
|
||||
spin_lock_init(&qt_port->lock);
|
||||
@ -1041,7 +1048,7 @@ static void qt_block_until_empty(struct tty_struct *tty,
|
||||
}
|
||||
}
|
||||
|
||||
static void qt_close( struct usb_serial_port *port)
|
||||
static void qt_close(struct usb_serial_port *port)
|
||||
{
|
||||
struct usb_serial *serial = port->serial;
|
||||
struct quatech_port *qt_port;
|
||||
@ -1068,6 +1075,7 @@ static void qt_close( struct usb_serial_port *port)
|
||||
/* wait up to for transmitter to empty */
|
||||
if (serial->dev)
|
||||
qt_block_until_empty(tty, qt_port);
|
||||
tty_kref_put(tty);
|
||||
|
||||
/* Close uart channel */
|
||||
status = qt_close_channel(serial, index);
|
||||
|
@ -1,10 +0,0 @@
|
||||
config USB_SERIAL_ATEN2011
|
||||
tristate "ATEN 2011 USB to serial device support"
|
||||
depends on USB_SERIAL
|
||||
default N
|
||||
---help---
|
||||
Say Y here if you want to use a ATEN 2011 dual port USB to serial
|
||||
adapter.
|
||||
|
||||
To compile this driver as a module, choose M here: the module will be
|
||||
called aten2011.
|
@ -1 +0,0 @@
|
||||
obj-$(CONFIG_USB_SERIAL_ATEN2011) += aten2011.o
|
@ -1,7 +0,0 @@
|
||||
TODO:
|
||||
- checkpatch.pl cleanups
|
||||
- remove dead and useless code (auditing the tty ioctls to
|
||||
verify that they really are correct and needed.)
|
||||
|
||||
Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
|
||||
Russell Lang <gsview@ghostgum.com.au>.
|
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#include "udlfb.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user