summaryrefslogtreecommitdiff
path: root/drivers/s390/char/monwriter.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-06 16:13:53 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-06 16:13:53 (GMT)
commitda104a83692cf07434ab3b20bf10093bdbc3f97e (patch)
tree6343600c318c600f0dcdf71406bf7d993823afd4 /drivers/s390/char/monwriter.c
parent96e1a87392293cf895ea99ab70758453897c7bbf (diff)
parentdc64bef5439c8e1fafea225054da4d8882c9d10c (diff)
downloadlinux-fsl-qoriq-da104a83692cf07434ab3b20bf10093bdbc3f97e.tar.xz
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] Use CONFIG_GENERIC_TIME and define TOD clock source. [PATCH] sysrq: irq change build fix. [S390] irq change build fixes. [S390] cio: 0 is a valid chpid. [S390] monwriter buffer limit. [S390] ap bus poll thread priority.
Diffstat (limited to 'drivers/s390/char/monwriter.c')
-rw-r--r--drivers/s390/char/monwriter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/s390/char/monwriter.c b/drivers/s390/char/monwriter.c
index 1e3939a..4362ff2 100644
--- a/drivers/s390/char/monwriter.c
+++ b/drivers/s390/char/monwriter.c
@@ -26,6 +26,7 @@
#define MONWRITE_MAX_DATALEN 4024
static int mon_max_bufs = 255;
+static int mon_buf_count;
struct mon_buf {
struct list_head list;
@@ -40,7 +41,6 @@ struct mon_private {
size_t hdr_to_read;
size_t data_to_read;
struct mon_buf *current_buf;
- int mon_buf_count;
};
/*
@@ -99,13 +99,13 @@ static int monwrite_new_hdr(struct mon_private *monpriv)
rc = monwrite_diag(monhdr, monbuf->data,
APPLDATA_STOP_REC);
list_del(&monbuf->list);
- monpriv->mon_buf_count--;
+ mon_buf_count--;
kfree(monbuf->data);
kfree(monbuf);
monbuf = NULL;
}
} else {
- if (monpriv->mon_buf_count >= mon_max_bufs)
+ if (mon_buf_count >= mon_max_bufs)
return -ENOSPC;
monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL);
if (!monbuf)
@@ -118,7 +118,7 @@ static int monwrite_new_hdr(struct mon_private *monpriv)
}
monbuf->hdr = *monhdr;
list_add_tail(&monbuf->list, &monpriv->list);
- monpriv->mon_buf_count++;
+ mon_buf_count++;
}
monpriv->current_buf = monbuf;
return 0;
@@ -186,7 +186,7 @@ static int monwrite_close(struct inode *inode, struct file *filp)
if (entry->hdr.mon_function != MONWRITE_GEN_EVENT)
monwrite_diag(&entry->hdr, entry->data,
APPLDATA_STOP_REC);
- monpriv->mon_buf_count--;
+ mon_buf_count--;
list_del(&entry->list);
kfree(entry->data);
kfree(entry);