summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMike Shaver <shaver@ingenia.com>1997-08-16 01:43:24 +0000
committerMike Shaver <shaver@ingenia.com>1997-08-16 01:43:24 +0000
commitfc3482fb16dbbcdfdf55b552f1eec635e93fa0d0 (patch)
tree6772dc87b12f7c8740a480406379e337f2b61a92 /drivers
parentce30b2df04c96797cd11914a9c12b43f0cc307f8 (diff)
Stubbed out usema driver for Miguel.
(Untested, really, thanks to UPS.)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sgi/char/Makefile2
-rw-r--r--drivers/sgi/char/graphics.c1
-rw-r--r--drivers/sgi/char/graphics.h1
-rw-r--r--drivers/sgi/char/usema.c8
4 files changed, 10 insertions, 2 deletions
diff --git a/drivers/sgi/char/Makefile b/drivers/sgi/char/Makefile
index 123b2c90a..7032c700c 100644
--- a/drivers/sgi/char/Makefile
+++ b/drivers/sgi/char/Makefile
@@ -9,7 +9,7 @@
O_TARGET := sgichar.o
O_OBJS := graphics.o streamable.o newport.o cons_newport.o sgicons.o \
- vga_font.o rrm.o shmiq.o
+ vga_font.o rrm.o shmiq.o usema.o
ifeq ($(CONFIG_SGI_SERIAL),y)
O_OBJS += sgiserial.o
diff --git a/drivers/sgi/char/graphics.c b/drivers/sgi/char/graphics.c
index 14390c40f..c6741fb65 100644
--- a/drivers/sgi/char/graphics.c
+++ b/drivers/sgi/char/graphics.c
@@ -278,6 +278,7 @@ gfx_init (const char **name)
printk ("GFX INIT: ");
shmiq_init ();
+ usema_init ();
if ((g = newport_probe (boards, name)) != 0){
cards [boards] = *g;
diff --git a/drivers/sgi/char/graphics.h b/drivers/sgi/char/graphics.h
index 35c4f4f9a..df844386a 100644
--- a/drivers/sgi/char/graphics.h
+++ b/drivers/sgi/char/graphics.h
@@ -23,3 +23,4 @@ struct graphics_ops {
void shmiq_init (void);
void streamable_init (void);
+void usema_init (void);
diff --git a/drivers/sgi/char/usema.c b/drivers/sgi/char/usema.c
index a0e459f6f..602db0a9e 100644
--- a/drivers/sgi/char/usema.c
+++ b/drivers/sgi/char/usema.c
@@ -63,6 +63,7 @@ static struct irix_usema{
static int
sgi_usemaclone_open(struct inode *inode, struct file *filp)
{
+#ifdef USEMA_FOR_REAL
int semanum;
char semaname[14];
struct dentry * semadentry;
@@ -94,6 +95,7 @@ sgi_usemaclone_open(struct inode *inode, struct file *filp)
usema_list[semanum].filp = filp;
printk("[%s:%d] got usema %d",
current->comm, current->pid, semanum);
+#endif
return 0;
}
@@ -139,6 +141,7 @@ sgi_usema_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
int retval;
printk("[%s:%d] wants ioctl 0x%xd (arg 0x%xd)",
current->comm, current->pid, cmd, arg);
+#ifdef USEMA_FOR_REAL
switch(cmd) {
case UIOCATTACHSEMA: {
/* They pass us information about the semaphore to
@@ -212,6 +215,9 @@ sgi_usema_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
}
return -ENOSYS;
+#else
+ return 0;
+#endif
}
static unsigned int
@@ -225,7 +231,7 @@ sgi_usema_poll(struct file *filp, poll_table *wait)
- the lock becomes free and there's a process polling it
And I have to figure out poll()'s semantics. =)
*/
- return -ENOSYS;
+ return 0;
}
struct file_operations sgi_usema_fops = {