Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173289
b: refs/heads/master
c: 801f97b
h: refs/heads/master
i:
  173287: 36cc122
v: v3
  • Loading branch information
Gerald Schaefer authored and Martin Schwidefsky committed Dec 7, 2009
1 parent aa51c5e commit d940db6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1963403aae0fc5a4e20cf2e51e4f0148fdf938b4
refs/heads/master: 801f97b7da9dff4aace7111bfe0d073caf5febd2
7 changes: 4 additions & 3 deletions trunk/drivers/s390/char/monwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
Expand Down Expand Up @@ -185,13 +184,11 @@ static int monwrite_open(struct inode *inode, struct file *filp)
monpriv = kzalloc(sizeof(struct mon_private), GFP_KERNEL);
if (!monpriv)
return -ENOMEM;
lock_kernel();
INIT_LIST_HEAD(&monpriv->list);
monpriv->hdr_to_read = sizeof(monpriv->hdr);
mutex_init(&monpriv->thread_mutex);
filp->private_data = monpriv;
list_add_tail(&monpriv->priv_list, &mon_priv_list);
unlock_kernel();
return nonseekable_open(inode, filp);
}

Expand Down Expand Up @@ -364,6 +361,10 @@ static int __init mon_init(void)
goto out_driver;
}

/*
* misc_register() has to be the last action in module_init(), because
* file operations will be available right after this.
*/
rc = misc_register(&mon_dev);
if (rc)
goto out_device;
Expand Down

0 comments on commit d940db6

Please sign in to comment.