summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMike Shaver <shaver@ingenia.com>1997-08-12 18:43:17 +0000
committerMike Shaver <shaver@ingenia.com>1997-08-12 18:43:17 +0000
commitce30b2df04c96797cd11914a9c12b43f0cc307f8 (patch)
tree9b1b3d23990a36b344d72adf9c31f8117fee6074 /drivers
parentb185d83e11147657102decde7bc30d225ba5ee40 (diff)
It now compiles, but almost certainly doesn't work.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sgi/char/usema.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/sgi/char/usema.c b/drivers/sgi/char/usema.c
index 416dc167e..a0e459f6f 100644
--- a/drivers/sgi/char/usema.c
+++ b/drivers/sgi/char/usema.c
@@ -38,6 +38,7 @@
#include <asm/smp_lock.h>
#include <asm/usioctl.h>
#include <asm/mman.h>
+#include <asm/uaccess.h>
#define NUM_USEMAS (1 << MINORBITS - 1)
#define USEMA_FORMAT "/dev/usema%d"
@@ -80,7 +81,7 @@ sgi_usemaclone_open(struct inode *inode, struct file *filp)
* allocating and pull a switcheroo on filp->d_entry.
*/
sprintf(semaname, USEMA_FORMAT, semanum);
- semadentry = namei(semaname, 0);
+ semadentry = namei(semaname);
if (!semadentry) {
/* This Shouldn't Happen(tm) */
printk("[%s:%d] usemaclone_open: can't find dentry for %s",
@@ -173,7 +174,7 @@ sgi_usema_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case UIOCNOIBLOCK: /* XXX maybe? */
case UIOCBLOCK: {
/* Block this process on the semaphore */
- us_attach *attach = (us_attach *)arg;
+ usattach_t *attach = (usattach_t *)arg;
int semanum;
retval = verify_area(VERIFY_READ, attach, sizeof(usattach_t));
if (retval) {
@@ -194,7 +195,7 @@ sgi_usema_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case UIOCAUNBLOCK: /* XXX make `async' */
case UIOCUNBLOCK: {
/* Wake up all process waiting on this semaphore */
- us_attach *attach = (us_attach *)arg;
+ usattach_t *attach = (usattach_t *)arg;
int semanum;
retval = verify_area(VERIFY_READ, attach, sizeof(usattach_t));
if (retval) {
@@ -209,10 +210,11 @@ sgi_usema_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
wake_up(&usema_list[semanum].proc_list);
return 0;
}
+ }
return -ENOSYS;
}
-static int
+static unsigned int
sgi_usema_poll(struct file *filp, poll_table *wait)
{
int semanum = MINOR(filp->f_dentry->d_inode->i_rdev);