#include <linux/stddef.h>
#include <linux/init.h>
-#include <linux/config.h>
#include <linux/spinlock.h>
#include <asm/oplib.h>
#include <asm/io.h>
* in entry.S::floppy_tdone
*/
void __iomem *auxio_register = NULL;
-static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(auxio_lock);
void __init auxio_probe(void)
{
#endif
}
}
- prom_getproperty(auxio_nd, "reg", (char *) auxregs, sizeof(auxregs));
+ if(prom_getproperty(auxio_nd, "reg", (char *) auxregs, sizeof(auxregs)) <= 0)
+ return;
prom_apply_obio_ranges(auxregs, 0x1);
/* Map the register both read and write */
r.flags = auxregs[0].which_io & 0xF;
return;
/* Map the power control register. */
- prom_getproperty(node, "reg", (char *)®s, sizeof(regs));
+ if (prom_getproperty(node, "reg", (char *)®s, sizeof(regs)) <= 0)
+ return;
prom_apply_obio_ranges(®s, 1);
memset(&r, 0, sizeof(r));
r.flags = regs.which_io & 0xF;