summaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
commit482368b1a8e45430672c58c9a42e7d2004367126 (patch)
treece2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /drivers/sbus/char
parente4d0251c6f56ab2e191afb70f80f382793e23f74 (diff)
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'drivers/sbus/char')
-rw-r--r--drivers/sbus/char/bpp.c12
-rw-r--r--drivers/sbus/char/pcikbd.c5
-rw-r--r--drivers/sbus/char/sunkbd.c15
-rw-r--r--drivers/sbus/char/vfc.h3
-rw-r--r--drivers/sbus/char/vfc_dev.c15
5 files changed, 37 insertions, 13 deletions
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c
index 1d2bee01a..fb18a63c1 100644
--- a/drivers/sbus/char/bpp.c
+++ b/drivers/sbus/char/bpp.c
@@ -19,6 +19,7 @@
#include <linux/timer.h>
#include <linux/ioport.h>
#include <linux/major.h>
+#include <linux/devfs_fs_kernel.h>
#include <asm/uaccess.h>
#include <asm/io.h>
@@ -1004,6 +1005,8 @@ static inline void freeLptPort(int idx)
#endif
+static devfs_handle_t devfs_handle = NULL;
+
#ifdef MODULE
int init_module(void)
#else
@@ -1017,7 +1020,7 @@ int __init bpp_init(void)
if (rc == 0)
return -ENODEV;
- rc = register_chrdev(BPP_MAJOR, dev_name, &bpp_fops);
+ rc = devfs_register_chrdev(BPP_MAJOR, dev_name, &bpp_fops);
if (rc < 0)
return rc;
@@ -1025,6 +1028,10 @@ int __init bpp_init(void)
instances[idx].opened = 0;
probeLptPort(idx);
}
+ devfs_handle = devfs_mk_dir (NULL, "bpp", 3, NULL);
+ devfs_register_series (devfs_handle, "%u", BPP_NO, DEVFS_FL_DEFAULT,
+ BPP_MAJOR, 0, S_IFCHR | S_IRUSR | S_IWUSR, 0, 0,
+ &bpp_fops, NULL);
return 0;
}
@@ -1034,7 +1041,8 @@ void cleanup_module(void)
{
unsigned idx;
- unregister_chrdev(BPP_MAJOR, dev_name);
+ devfs_unregister (devfs_handle);
+ devfs_unregister_chrdev(BPP_MAJOR, dev_name);
for (idx = 0 ; idx < BPP_NO ; idx += 1) {
if (instances[idx].present)
diff --git a/drivers/sbus/char/pcikbd.c b/drivers/sbus/char/pcikbd.c
index 97ebda430..76b83eacb 100644
--- a/drivers/sbus/char/pcikbd.c
+++ b/drivers/sbus/char/pcikbd.c
@@ -1,4 +1,4 @@
-/* $Id: pcikbd.c,v 1.43 2000/02/09 22:33:25 davem Exp $
+/* $Id: pcikbd.c,v 1.44 2000/02/11 04:49:13 davem Exp $
* pcikbd.c: Ultra/AX PC keyboard support.
*
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
@@ -1024,9 +1024,6 @@ int __init ps2kbd_probe(void)
goto found;
}
#endif
- if (!pci_present())
- goto do_enodev;
-
/*
* Get the nodes for keyboard and mouse from aliases on normal systems.
*/
diff --git a/drivers/sbus/char/sunkbd.c b/drivers/sbus/char/sunkbd.c
index 7e26f3491..91bf24a18 100644
--- a/drivers/sbus/char/sunkbd.c
+++ b/drivers/sbus/char/sunkbd.c
@@ -24,6 +24,7 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/sysrq.h>
+#include <linux/devfs_fs_kernel.h>
#include <asm/kbio.h>
#include <asm/vuid_event.h>
@@ -507,7 +508,7 @@ void sunkbd_inchar(unsigned char ch, struct pt_regs *regs)
}
do_poke_blanked_console = 1;
- mark_bh(CONSOLE_BH);
+ tasklet_schedule(&console_tasklet);
add_keyboard_randomness(keycode);
tty = ttytab? ttytab[fg_console]: NULL;
@@ -616,7 +617,7 @@ static void put_queue(int ch)
wake_up(&keypress_wait);
if (tty) {
tty_insert_flip_char(tty, ch, 0);
- tty_schedule_flip(tty);
+ con_schedule_flip(tty);
}
}
@@ -630,7 +631,7 @@ static void puts_queue(char *cp)
tty_insert_flip_char(tty, *cp, 0);
cp++;
}
- tty_schedule_flip(tty);
+ con_schedule_flip(tty);
}
static void applkey(int key, char mode)
@@ -742,7 +743,7 @@ static void send_intr(void)
if (!tty)
return;
tty_insert_flip_char(tty, 0, TTY_BREAK);
- tty_schedule_flip(tty);
+ con_schedule_flip(tty);
}
static void scroll_forw(void)
@@ -1549,7 +1550,11 @@ void __init keyboard_zsinit(void (*put_char)(unsigned char))
send_cmd(SKBDCMD_SETLED); send_cmd(0x0); /* All off */
/* Register the /dev/kbd interface */
- if (register_chrdev (KBD_MAJOR, "kbd", &kbd_fops)){
+ devfs_register (NULL, "kbd", 0, DEVFS_FL_NONE,
+ KBD_MAJOR, 0,
+ S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, 0, 0,
+ &kbd_fops, NULL);
+ if (devfs_register_chrdev (KBD_MAJOR, "kbd", &kbd_fops)){
printk ("Could not register /dev/kbd device\n");
return;
}
diff --git a/drivers/sbus/char/vfc.h b/drivers/sbus/char/vfc.h
index b9ed039ce..c22f835c0 100644
--- a/drivers/sbus/char/vfc.h
+++ b/drivers/sbus/char/vfc.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_VFC_H_
#define _LINUX_VFC_H_
+#include <linux/devfs_fs_kernel.h>
+
/*
* The control register for the vfc is at offset 0x4000
* The first field ram bank is located at offset 0x5000
@@ -126,6 +128,7 @@ struct vfc_dev {
volatile struct vfc_regs *regs;
struct vfc_regs *phys_regs;
unsigned int control_reg;
+ devfs_handle_t de;
struct semaphore device_lock_sem;
struct timer_list poll_timer;
wait_queue_head_t poll_wait;
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c
index 5f7af8642..a5e61bb9a 100644
--- a/drivers/sbus/char/vfc_dev.c
+++ b/drivers/sbus/char/vfc_dev.c
@@ -41,6 +41,7 @@
#include "vfc.h"
#include <asm/vfc_ioctls.h>
+static devfs_handle_t devfs_handle = NULL; /* For the directory */
struct vfc_dev **vfc_dev_lst;
static char vfcstr[]="vfc";
static unsigned char saa9051_init_array[VFC_SAA9051_NR] = {
@@ -140,6 +141,8 @@ int init_vfc_devstruct(struct vfc_dev *dev, int instance)
int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance)
{
+ char devname[8];
+
if(dev == NULL) {
printk(KERN_ERR "VFC: Bogus pointer passed\n");
return -ENOMEM;
@@ -162,6 +165,11 @@ int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance)
if (init_vfc_hw(dev))
return -EIO;
+ sprintf (devname, "%d", instance);
+ dev->de = devfs_register (devfs_handle, devname, 0, DEVFS_FL_DEFAULT,
+ VFC_MAJOR, instance,
+ S_IFCHR | S_IRUSR | S_IWUSR, 0, 0,
+ &vfc_fops, NULL);
return 0;
}
@@ -659,12 +667,13 @@ static int vfc_probe(void)
memset(vfc_dev_lst, 0, sizeof(struct vfc_dev *) * (cards + 1));
vfc_dev_lst[cards] = NULL;
- ret = register_chrdev(VFC_MAJOR, vfcstr, &vfc_fops);
+ ret = devfs_register_chrdev(VFC_MAJOR, vfcstr, &vfc_fops);
if(ret) {
printk(KERN_ERR "Unable to get major number %d\n", VFC_MAJOR);
kfree(vfc_dev_lst);
return -EIO;
}
+ devfs_handle = devfs_mk_dir (NULL, "vfc", 3, NULL);
instance = 0;
for_all_sbusdev(sdev, sbus) {
@@ -705,6 +714,7 @@ static void deinit_vfc_device(struct vfc_dev *dev)
{
if(dev == NULL)
return;
+ devfs_unregister (dev->de);
sbus_iounmap((unsigned long)dev->regs, sizeof(struct vfc_regs));
kfree(dev);
}
@@ -713,11 +723,12 @@ void cleanup_module(void)
{
struct vfc_dev **devp;
- unregister_chrdev(VFC_MAJOR,vfcstr);
+ devfs_unregister_chrdev(VFC_MAJOR,vfcstr);
for (devp = vfc_dev_lst; *devp; devp++)
deinit_vfc_device(*devp);
+ devfs_unregister (devfs_handle);
kfree(vfc_dev_lst);
return;
}