git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[pandora-kernel.git]
/
arch
/
powerpc
/
kernel
/
rtas_flash.c
diff --git
a/arch/powerpc/kernel/rtas_flash.c
b/arch/powerpc/kernel/rtas_flash.c
index
6f6fc97
..
f72118c
100644
(file)
--- a/
arch/powerpc/kernel/rtas_flash.c
+++ b/
arch/powerpc/kernel/rtas_flash.c
@@
-101,7
+101,7
@@
struct flash_block_list_header { /* just the header of flash_block_list */
static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL};
/* Use slab cache to guarantee 4k alignment */
static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL};
/* Use slab cache to guarantee 4k alignment */
-static
kmem_cache_t
*flash_block_cache = NULL;
+static
struct kmem_cache
*flash_block_cache = NULL;
#define FLASH_BLOCK_LIST_VERSION (1UL)
#define FLASH_BLOCK_LIST_VERSION (1UL)
@@
-193,7
+193,7
@@
static void free_flash_list(struct flash_block_list *f)
static int rtas_flash_release(struct inode *inode, struct file *file)
{
static int rtas_flash_release(struct inode *inode, struct file *file)
{
- struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
+ struct proc_dir_entry *dp = PDE(file->f_
path.
dentry->d_inode);
struct rtas_update_flash_t *uf;
uf = (struct rtas_update_flash_t *) dp->data;
struct rtas_update_flash_t *uf;
uf = (struct rtas_update_flash_t *) dp->data;
@@
-255,7
+255,7
@@
static void get_flash_status_msg(int status, char *buf)
static ssize_t rtas_flash_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
static ssize_t rtas_flash_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
+ struct proc_dir_entry *dp = PDE(file->f_
path.
dentry->d_inode);
struct rtas_update_flash_t *uf;
char msg[RTAS_MSG_MAXLEN];
int msglen;
struct rtas_update_flash_t *uf;
char msg[RTAS_MSG_MAXLEN];
int msglen;
@@
-286,7
+286,7
@@
static ssize_t rtas_flash_read(struct file *file, char __user *buf,
}
/* constructor for flash_block_cache */
}
/* constructor for flash_block_cache */
-void rtas_block_ctor(void *ptr,
kmem_cache_t
*cache, unsigned long flags)
+void rtas_block_ctor(void *ptr,
struct kmem_cache
*cache, unsigned long flags)
{
memset(ptr, 0, RTAS_BLK_SIZE);
}
{
memset(ptr, 0, RTAS_BLK_SIZE);
}
@@
-299,7
+299,7
@@
void rtas_block_ctor(void *ptr, kmem_cache_t *cache, unsigned long flags)
static ssize_t rtas_flash_write(struct file *file, const char __user *buffer,
size_t count, loff_t *off)
{
static ssize_t rtas_flash_write(struct file *file, const char __user *buffer,
size_t count, loff_t *off)
{
- struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
+ struct proc_dir_entry *dp = PDE(file->f_
path.
dentry->d_inode);
struct rtas_update_flash_t *uf;
char *p;
int next_free;
struct rtas_update_flash_t *uf;
char *p;
int next_free;
@@
-391,7
+391,7
@@
static void manage_flash(struct rtas_manage_flash_t *args_buf)
static ssize_t manage_flash_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
static ssize_t manage_flash_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
+ struct proc_dir_entry *dp = PDE(file->f_
path.
dentry->d_inode);
struct rtas_manage_flash_t *args_buf;
char msg[RTAS_MSG_MAXLEN];
int msglen;
struct rtas_manage_flash_t *args_buf;
char msg[RTAS_MSG_MAXLEN];
int msglen;
@@
-421,7
+421,7
@@
static ssize_t manage_flash_read(struct file *file, char __user *buf,
static ssize_t manage_flash_write(struct file *file, const char __user *buf,
size_t count, loff_t *off)
{
static ssize_t manage_flash_write(struct file *file, const char __user *buf,
size_t count, loff_t *off)
{
- struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
+ struct proc_dir_entry *dp = PDE(file->f_
path.
dentry->d_inode);
struct rtas_manage_flash_t *args_buf;
const char reject_str[] = "0";
const char commit_str[] = "1";
struct rtas_manage_flash_t *args_buf;
const char reject_str[] = "0";
const char commit_str[] = "1";
@@
-492,7
+492,7
@@
static int get_validate_flash_msg(struct rtas_validate_flash_t *args_buf,
static ssize_t validate_flash_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
static ssize_t validate_flash_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
+ struct proc_dir_entry *dp = PDE(file->f_
path.
dentry->d_inode);
struct rtas_validate_flash_t *args_buf;
char msg[RTAS_MSG_MAXLEN];
int msglen;
struct rtas_validate_flash_t *args_buf;
char msg[RTAS_MSG_MAXLEN];
int msglen;
@@
-520,7
+520,7
@@
static ssize_t validate_flash_read(struct file *file, char __user *buf,
static ssize_t validate_flash_write(struct file *file, const char __user *buf,
size_t count, loff_t *off)
{
static ssize_t validate_flash_write(struct file *file, const char __user *buf,
size_t count, loff_t *off)
{
- struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
+ struct proc_dir_entry *dp = PDE(file->f_
path.
dentry->d_inode);
struct rtas_validate_flash_t *args_buf;
int rc;
struct rtas_validate_flash_t *args_buf;
int rc;
@@
-569,7
+569,7
@@
done:
static int validate_flash_release(struct inode *inode, struct file *file)
{
static int validate_flash_release(struct inode *inode, struct file *file)
{
- struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
+ struct proc_dir_entry *dp = PDE(file->f_
path.
dentry->d_inode);
struct rtas_validate_flash_t *args_buf;
args_buf = (struct rtas_validate_flash_t *) dp->data;
struct rtas_validate_flash_t *args_buf;
args_buf = (struct rtas_validate_flash_t *) dp->data;
@@
-681,14
+681,12
@@
static int initialize_flash_pde_data(const char *rtas_call_name,
int *status;
int token;
int *status;
int token;
- dp->data = k
m
alloc(buf_size, GFP_KERNEL);
+ dp->data = k
z
alloc(buf_size, GFP_KERNEL);
if (dp->data == NULL) {
remove_flash_pde(dp);
return -ENOMEM;
}
if (dp->data == NULL) {
remove_flash_pde(dp);
return -ENOMEM;
}
- memset(dp->data, 0, buf_size);
-
/*
* This code assumes that the status int is the first member of the
* struct
/*
* This code assumes that the status int is the first member of the
* struct
@@
-704,13
+702,12
@@
static int initialize_flash_pde_data(const char *rtas_call_name,
}
static struct proc_dir_entry *create_flash_pde(const char *filename,
}
static struct proc_dir_entry *create_flash_pde(const char *filename,
- struct file_operations *fops)
+
const
struct file_operations *fops)
{
struct proc_dir_entry *ent = NULL;
ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL);
if (ent != NULL) {
{
struct proc_dir_entry *ent = NULL;
ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL);
if (ent != NULL) {
- ent->nlink = 1;
ent->proc_fops = fops;
ent->owner = THIS_MODULE;
}
ent->proc_fops = fops;
ent->owner = THIS_MODULE;
}
@@
-718,21
+715,21
@@
static struct proc_dir_entry *create_flash_pde(const char *filename,
return ent;
}
return ent;
}
-static struct file_operations rtas_flash_operations = {
+static
const
struct file_operations rtas_flash_operations = {
.read = rtas_flash_read,
.write = rtas_flash_write,
.open = rtas_excl_open,
.release = rtas_flash_release,
};
.read = rtas_flash_read,
.write = rtas_flash_write,
.open = rtas_excl_open,
.release = rtas_flash_release,
};
-static struct file_operations manage_flash_operations = {
+static
const
struct file_operations manage_flash_operations = {
.read = manage_flash_read,
.write = manage_flash_write,
.open = rtas_excl_open,
.release = rtas_excl_release,
};
.read = manage_flash_read,
.write = manage_flash_write,
.open = rtas_excl_open,
.release = rtas_excl_release,
};
-static struct file_operations validate_flash_operations = {
+static
const
struct file_operations validate_flash_operations = {
.read = validate_flash_read,
.write = validate_flash_write,
.open = rtas_excl_open,
.read = validate_flash_read,
.write = validate_flash_write,
.open = rtas_excl_open,