Commit 1f78099a authored by David S. Miller's avatar David S. Miller

Merge davem@nuts.ninka.net:/home/davem/src/BK/sparc-2.5

into kernel.bkbits.net:/home/davem/sparc-2.5
parents b6e27b19 6196166f
......@@ -94,8 +94,6 @@ extern int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
extern long sparc32_open(const char * filename, int flags, int mode);
extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *));
extern int unregister_ioctl32_conversion(unsigned int cmd);
extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space);
extern int __ashrdi3(int, int);
......@@ -234,10 +232,6 @@ EXPORT_SYMBOL(pci_dma_sync_sg);
EXPORT_SYMBOL(pci_dma_supported);
#endif
/* IOCTL32 emulation hooks. */
EXPORT_SYMBOL(register_ioctl32_conversion);
EXPORT_SYMBOL(unregister_ioctl32_conversion);
/* I/O device mmaping on Sparc64. */
EXPORT_SYMBOL(io_remap_page_range);
......
......@@ -442,12 +442,6 @@ asmlinkage int sys_getdomainname(char __user *name, int len)
return err;
}
/* only AP+ systems have sys_aplib */
asmlinkage int sys_aplib(void)
{
return -ENOSYS;
}
asmlinkage int solaris_syscall(struct pt_regs *regs)
{
static int count;
......
......@@ -70,7 +70,7 @@ sys_call_table32:
/*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
.word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep
/*250*/ .word sys32_mremap, sys32_sysctl, sys_getsid, sys_fdatasync, sys32_nfsservctl
.word sys_aplib
.word sys_ni_syscall
/* Now the 64-bit native Linux syscall table. */
......@@ -132,7 +132,7 @@ sys_call_table:
/*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
.word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep
/*250*/ .word sys64_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl
.word sys_aplib
.word sys_ni_syscall
#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \
defined(CONFIG_SOLARIS_EMUL_MODULE)
......@@ -227,6 +227,6 @@ sunos_sys_table:
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys
/*250*/ .word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sys_aplib
.word sunos_nosys, sunos_nosys, sys_ni_syscall
#endif
......@@ -571,12 +571,13 @@ static void attach_one_fan(struct linux_ebus_child *echild, int fan_idx)
set_fan_speeds(fp);
}
void bbc_envctrl_init(void)
int bbc_envctrl_init(void)
{
struct linux_ebus_child *echild;
int temp_index = 0;
int fan_index = 0;
int devidx = 0;
int err = 0;
while ((echild = bbc_i2c_getdev(devidx++)) != NULL) {
if (!strcmp(echild->prom_name, "temperature"))
......@@ -585,7 +586,8 @@ void bbc_envctrl_init(void)
attach_one_fan(echild, fan_index++);
}
if (temp_index != 0 && fan_index != 0)
kernel_thread(kenvctrld, NULL, CLONE_FS | CLONE_FILES);
err = kernel_thread(kenvctrld, NULL, CLONE_FS | CLONE_FILES);
return err;
}
static void destroy_one_temp(struct bbc_cpu_temperature *tp)
......
......@@ -430,14 +430,15 @@ static int __init bbc_present(void)
return 0;
}
extern void bbc_envctrl_init(void);
extern int bbc_envctrl_init(void);
extern void bbc_envctrl_cleanup(void);
static void bbc_i2c_cleanup(void);
static int __init bbc_i2c_init(void)
{
struct linux_ebus *ebus = NULL;
struct linux_ebus_device *edev = NULL;
int index = 0;
int err, index = 0;
if (tlb_type != cheetah || !bbc_present())
return -ENODEV;
......@@ -454,11 +455,13 @@ static int __init bbc_i2c_init(void)
if (!index)
return -ENODEV;
bbc_envctrl_init();
return 0;
err = bbc_envctrl_init();
if (err)
bbc_i2c_cleanup();
return err;
}
static void __exit bbc_i2c_cleanup(void)
static void bbc_i2c_cleanup(void)
{
struct bbc_i2c_bus *bp = all_bbc_i2c;
......
......@@ -1053,7 +1053,7 @@ static int __init envctrl_init(void)
struct linux_ebus *ebus = NULL;
struct linux_ebus_device *edev = NULL;
struct linux_ebus_child *edev_child = NULL;
int i = 0;
int err, i = 0;
for_each_ebus(ebus) {
for_each_ebusdev(edev, ebus) {
......@@ -1108,9 +1108,11 @@ static int __init envctrl_init(void)
udelay(200);
/* Register the device as a minor miscellaneous device. */
if (misc_register(&envctrl_dev)) {
err = misc_register(&envctrl_dev);
if (err) {
printk("envctrl: Unable to get misc minor %d\n",
envctrl_dev.minor);
goto out_iounmap;
}
/* Note above traversal routine post-incremented 'i' to accommodate
......@@ -1125,9 +1127,21 @@ static int __init envctrl_init(void)
i2c_childlist[i].addr, (0 == i) ? ("\n") : (" "));
}
kernel_thread(kenvctrld, NULL, CLONE_FS | CLONE_FILES);
err = kernel_thread(kenvctrld, NULL, CLONE_FS | CLONE_FILES);
if (err)
goto out_deregister;
return 0;
out_deregister:
misc_deregister(&envctrl_dev);
out_iounmap:
iounmap(i2c);
for (i = 0; i < ENVCTRL_MAX_CPU * 2; i++) {
if (i2c_childlist[i].tables)
kfree(i2c_childlist[i].tables);
}
return err;
#else
return -ENODEV;
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment