aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/ibmasm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/ibmasm')
-rw-r--r--drivers/misc/ibmasm/ibmasmfs.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c
index 4a35caff5d02..b99dc507de2e 100644
--- a/drivers/misc/ibmasm/ibmasmfs.c
+++ b/drivers/misc/ibmasm/ibmasmfs.c
@@ -147,7 +147,6 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)
147 if (ret) { 147 if (ret) {
148 ret->i_mode = mode; 148 ret->i_mode = mode;
149 ret->i_uid = ret->i_gid = 0; 149 ret->i_uid = ret->i_gid = 0;
150 ret->i_blksize = PAGE_CACHE_SIZE;
151 ret->i_blocks = 0; 150 ret->i_blocks = 0;
152 ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; 151 ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
153 } 152 }
@@ -175,7 +174,7 @@ static struct dentry *ibmasmfs_create_file (struct super_block *sb,
175 } 174 }
176 175
177 inode->i_fop = fops; 176 inode->i_fop = fops;
178 inode->u.generic_ip = data; 177 inode->i_private = data;
179 178
180 d_add(dentry, inode); 179 d_add(dentry, inode);
181 return dentry; 180 return dentry;
@@ -244,7 +243,7 @@ static int command_file_open(struct inode *inode, struct file *file)
244{ 243{
245 struct ibmasmfs_command_data *command_data; 244 struct ibmasmfs_command_data *command_data;
246 245
247 if (!inode->u.generic_ip) 246 if (!inode->i_private)
248 return -ENODEV; 247 return -ENODEV;
249 248
250 command_data = kmalloc(sizeof(struct ibmasmfs_command_data), GFP_KERNEL); 249 command_data = kmalloc(sizeof(struct ibmasmfs_command_data), GFP_KERNEL);
@@ -252,7 +251,7 @@ static int command_file_open(struct inode *inode, struct file *file)
252 return -ENOMEM; 251 return -ENOMEM;
253 252
254 command_data->command = NULL; 253 command_data->command = NULL;
255 command_data->sp = inode->u.generic_ip; 254 command_data->sp = inode->i_private;
256 file->private_data = command_data; 255 file->private_data = command_data;
257 return 0; 256 return 0;
258} 257}
@@ -351,10 +350,10 @@ static int event_file_open(struct inode *inode, struct file *file)
351 struct ibmasmfs_event_data *event_data; 350 struct ibmasmfs_event_data *event_data;
352 struct service_processor *sp; 351 struct service_processor *sp;
353 352
354 if (!inode->u.generic_ip) 353 if (!inode->i_private)
355 return -ENODEV; 354 return -ENODEV;
356 355
357 sp = inode->u.generic_ip; 356 sp = inode->i_private;
358 357
359 event_data = kmalloc(sizeof(struct ibmasmfs_event_data), GFP_KERNEL); 358 event_data = kmalloc(sizeof(struct ibmasmfs_event_data), GFP_KERNEL);
360 if (!event_data) 359 if (!event_data)
@@ -439,14 +438,14 @@ static int r_heartbeat_file_open(struct inode *inode, struct file *file)
439{ 438{
440 struct ibmasmfs_heartbeat_data *rhbeat; 439 struct ibmasmfs_heartbeat_data *rhbeat;
441 440
442 if (!inode->u.generic_ip) 441 if (!inode->i_private)
443 return -ENODEV; 442 return -ENODEV;
444 443
445 rhbeat = kmalloc(sizeof(struct ibmasmfs_heartbeat_data), GFP_KERNEL); 444 rhbeat = kmalloc(sizeof(struct ibmasmfs_heartbeat_data), GFP_KERNEL);
446 if (!rhbeat) 445 if (!rhbeat)
447 return -ENOMEM; 446 return -ENOMEM;
448 447
449 rhbeat->sp = (struct service_processor *)inode->u.generic_ip; 448 rhbeat->sp = inode->i_private;
450 rhbeat->active = 0; 449 rhbeat->active = 0;
451 ibmasm_init_reverse_heartbeat(rhbeat->sp, &rhbeat->heartbeat); 450 ibmasm_init_reverse_heartbeat(rhbeat->sp, &rhbeat->heartbeat);
452 file->private_data = rhbeat; 451 file->private_data = rhbeat;
@@ -508,7 +507,7 @@ static ssize_t r_heartbeat_file_write(struct file *file, const char __user *buf,
508 507
509static int remote_settings_file_open(struct inode *inode, struct file *file) 508static int remote_settings_file_open(struct inode *inode, struct file *file)
510{ 509{
511 file->private_data = inode->u.generic_ip; 510 file->private_data = inode->i_private;
512 return 0; 511 return 0;
513} 512}
514 513