diff options
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/envctrl.c | 13 | ||||
-rw-r--r-- | drivers/sbus/char/sunmouse.c | 15 | ||||
-rw-r--r-- | drivers/sbus/char/sunserial.c | 4 |
3 files changed, 9 insertions, 23 deletions
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index 08acf4f81..039994471 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c @@ -1,4 +1,4 @@ -/* $Id: envctrl.c,v 1.15 2000/02/09 22:33:23 davem Exp $ +/* $Id: envctrl.c,v 1.16 2000/03/22 21:29:23 ecd Exp $ * envctrl.c: Temperature and Fan monitoring on Machines providing it. * * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) @@ -1002,7 +1002,6 @@ rasctrl_setup(int node) return 0; out: - envctrl_stop(); return -ENODEV; } @@ -1381,7 +1380,7 @@ envctrl_setup(int node) } else { err = prom_getproperty(node, "cpu-temp-factors", envctrl.cpu_temp_table, 256); - if (err) { + if (err < 0) { printk("envctrl: can't read `cpu-temp-factors'\n"); goto out; } @@ -1398,7 +1397,7 @@ envctrl_setup(int node) } else { err = prom_getproperty(node, "cpu-fan-speeds", envctrl.cpu_fan_speeds, 112); - if (err) { + if (err < 0) { printk("envctrl: can't read `cpu-fan-speeds'\n"); goto out; } @@ -1415,7 +1414,7 @@ envctrl_setup(int node) } else { err = prom_getproperty(node, "ps-temp-factors", envctrl.ps_temp_table, 256); - if (err) { + if (err < 0) { printk("envctrl: can't read `ps-temp-factors'\n"); goto out; } @@ -1432,7 +1431,7 @@ envctrl_setup(int node) } else { err = prom_getproperty(node, "ps-fan-speeds", envctrl.ps_fan_speeds, 112); - if (err) { + if (err < 0) { printk("envctrl: can't read `ps-fan-speeds'\n"); goto out; } @@ -1449,8 +1448,6 @@ envctrl_setup(int node) out: if (tmp) kfree(tmp); - - envctrl_stop(); return err; } #endif /* U450_SUPPORT */ diff --git a/drivers/sbus/char/sunmouse.c b/drivers/sbus/char/sunmouse.c index 091702d15..f1641a33a 100644 --- a/drivers/sbus/char/sunmouse.c +++ b/drivers/sbus/char/sunmouse.c @@ -69,7 +69,6 @@ struct sun_mouse { unsigned char prev_state; /* Previous button state */ int delta_x; /* Current delta-x */ int delta_y; /* Current delta-y */ - int present; int ready; /* set if there if data is available */ int active; /* set if device is open */ int vuid_mode; /* VUID_NATIVE or VUID_FIRM_EVENT */ @@ -382,8 +381,6 @@ sun_mouse_open(struct inode * inode, struct file * file) { if(sunmouse.active++) return 0; - if(!sunmouse.present) - return -EINVAL; sunmouse.ready = sunmouse.delta_x = sunmouse.delta_y = 0; sunmouse.button_state = 0x80; sunmouse.vuid_mode = VUID_NATIVE; @@ -555,11 +552,8 @@ static struct miscdevice sun_mouse_mouse = { SUN_MOUSE_MINOR, "sunmouse", &sun_mouse_fops }; -int __init sun_mouse_init(void) +void sun_mouse_zsinit(void) { - if (!sunmouse.present) - return -ENODEV; - printk("Sun Mouse-Systems mouse driver version 1.00\n"); sunmouse.ready = sunmouse.active = 0; @@ -568,11 +562,4 @@ int __init sun_mouse_init(void) sunmouse.button_state = 0x80; init_waitqueue_head(&sunmouse.proc_list); sunmouse.byte = 69; - return 0; -} - -void -sun_mouse_zsinit(void) -{ - sunmouse.present = 1; } diff --git a/drivers/sbus/char/sunserial.c b/drivers/sbus/char/sunserial.c index 9719f625a..e58eb1ef7 100644 --- a/drivers/sbus/char/sunserial.c +++ b/drivers/sbus/char/sunserial.c @@ -1,4 +1,4 @@ -/* $Id: sunserial.c,v 1.74 1999/12/15 22:30:23 davem Exp $ +/* $Id: sunserial.c,v 1.75 2000/03/22 02:45:36 davem Exp $ * serial.c: Serial port driver infrastructure for the Sparc. * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -67,6 +67,8 @@ int rs_init(void) return err; } +__initcall(rs_init); + void __init rs_kgdb_hook(int channel) { rs_ops.rs_kgdb_hook(channel); |