X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fsbus%2Fchar%2Fflash.c;h=0d42950448f57625a7d4dd4d96061d58b8485ad4;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=61cf81ff5abefe6442747262ab3fc39600365557;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 61cf81ff5..0d4295044 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c @@ -22,6 +22,7 @@ #include #include #include +#include static spinlock_t flash_lock = SPIN_LOCK_UNLOCKED; static struct { @@ -105,7 +106,7 @@ flash_llseek(struct file *file, long long offset, int origin) } static ssize_t -flash_read(struct file * file, char * buf, +flash_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { unsigned long p = file->f_pos; @@ -115,7 +116,7 @@ flash_read(struct file * file, char * buf, count = flash.read_size - p; for (i = 0; i < count; i++) { - u8 data = readb(flash.read_base + p + i); + u8 data = upa_readb(flash.read_base + p + i); if (put_user(data, buf)) return -EFAULT; buf++; @@ -161,10 +162,10 @@ static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; static int __init flash_init(void) { struct sbus_bus *sbus; - struct sbus_dev *sdev = 0; + struct sbus_dev *sdev = NULL; #ifdef CONFIG_PCI struct linux_ebus *ebus; - struct linux_ebus_device *edev = 0; + struct linux_ebus_device *edev = NULL; struct linux_prom_registers regs[2]; int len, nregs; #endif