X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fppc64%2Fkernel%2Fnvram.c;h=241ba3aecd0cbe004c2ee8f37fc7d320fde4dc57;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=49ddf5e0926bc8c811ec1323c663392762a4b463;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/ppc64/kernel/nvram.c b/arch/ppc64/kernel/nvram.c index 49ddf5e09..241ba3aec 100644 --- a/arch/ppc64/kernel/nvram.c +++ b/arch/ppc64/kernel/nvram.c @@ -31,6 +31,7 @@ #include #include #include +#include #undef DEBUG_NVRAM @@ -43,9 +44,9 @@ static struct nvram_partition * nvram_part; static long nvram_error_log_index = -1; static long nvram_error_log_size = 0; -volatile int no_more_logging = 1; /* Until we initialize everything, - * make sure we don't try logging - * anything */ +int no_logging = 1; /* Until we initialize everything, + * make sure we don't try logging + * anything */ extern volatile int error_log_cnt; @@ -77,7 +78,7 @@ static loff_t dev_nvram_llseek(struct file *file, loff_t offset, int origin) } -static ssize_t dev_nvram_read(struct file *file, char *buf, +static ssize_t dev_nvram_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { ssize_t len; @@ -117,7 +118,7 @@ static ssize_t dev_nvram_read(struct file *file, char *buf, } -static ssize_t dev_nvram_write(struct file *file, const char *buf, +static ssize_t dev_nvram_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { ssize_t len; @@ -640,7 +641,7 @@ int nvram_write_error_log(char * buff, int length, unsigned int err_type) loff_t tmp_index; struct err_log_info info; - if (no_more_logging) { + if (no_logging) { return -EPERM; } @@ -711,7 +712,7 @@ int nvram_read_error_log(char * buff, int length, unsigned int * err_type) /* This doesn't actually zero anything, but it sets the event_logged * word to tell that this event is safely in syslog. */ -int nvram_clear_error_log() +int nvram_clear_error_log(void) { loff_t tmp_index; int clear_word = ERR_FLAG_ALREADY_LOGGED;