Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Browse files Browse the repository at this point in the history
* 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()
  • Loading branch information
Linus Torvalds committed Jul 29, 2009
2 parents 7de8b92 + fb29900 commit b7ebbb7
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 2,460 deletions.
2 changes: 0 additions & 2 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
8 changes: 5 additions & 3 deletions drivers/staging/android/lowmemorykiller.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 14 additions & 6 deletions drivers/staging/serqt_usb2/serqt_usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand All @@ -381,15 +381,15 @@ static void qt_read_bulk_callback(struct urb *urb)
*/
if (qt_port->RxHolding == 1) {
qt_port->ReadBulkStopped = 1;
return;
goto exit;
}

if (urb->status) {
qt_port->ReadBulkStopped = 1;

dbg("%s - nonzero read bulk status received: %d\n",
__func__, urb->status);
return;
goto exit;
}

if (tty && RxCount) {
Expand Down Expand Up @@ -463,6 +463,8 @@ static void qt_read_bulk_callback(struct urb *urb)
}

schedule_work(&port->work);
exit:
tty_kref_put(tty);
}

/*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down
10 changes: 0 additions & 10 deletions drivers/staging/uc2322/Kconfig

This file was deleted.

1 change: 0 additions & 1 deletion drivers/staging/uc2322/Makefile

This file was deleted.

7 changes: 0 additions & 7 deletions drivers/staging/uc2322/TODO

This file was deleted.

Loading

0 comments on commit b7ebbb7

Please sign in to comment.