diff options
Diffstat (limited to 'drivers/misc/ibmasm')
-rw-r--r-- | drivers/misc/ibmasm/ibmasm.h | 1 | ||||
-rw-r--r-- | drivers/misc/ibmasm/ibmasmfs.c | 17 | ||||
-rw-r--r-- | drivers/misc/ibmasm/module.c | 4 |
3 files changed, 10 insertions, 12 deletions
diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h index 6aba4195444..634d538ccd1 100644 --- a/drivers/misc/ibmasm/ibmasm.h +++ b/drivers/misc/ibmasm/ibmasm.h | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/wait.h> | 29 | #include <linux/wait.h> |
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/config.h> | ||
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
35 | #include <linux/device.h> | 34 | #include <linux/device.h> |
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index 4a35caff5d0..b99dc507de2 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 | ||
509 | static int remote_settings_file_open(struct inode *inode, struct file *file) | 508 | static 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 | ||
diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c index 1fdf03fd2da..2f3bddfab93 100644 --- a/drivers/misc/ibmasm/module.c +++ b/drivers/misc/ibmasm/module.c | |||
@@ -85,7 +85,7 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi | |||
85 | } | 85 | } |
86 | memset(sp, 0, sizeof(struct service_processor)); | 86 | memset(sp, 0, sizeof(struct service_processor)); |
87 | 87 | ||
88 | sp->lock = SPIN_LOCK_UNLOCKED; | 88 | spin_lock_init(&sp->lock); |
89 | INIT_LIST_HEAD(&sp->command_queue); | 89 | INIT_LIST_HEAD(&sp->command_queue); |
90 | 90 | ||
91 | pci_set_drvdata(pdev, (void *)sp); | 91 | pci_set_drvdata(pdev, (void *)sp); |
@@ -113,7 +113,7 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi | |||
113 | goto error_ioremap; | 113 | goto error_ioremap; |
114 | } | 114 | } |
115 | 115 | ||
116 | result = request_irq(sp->irq, ibmasm_interrupt_handler, SA_SHIRQ, sp->devname, (void*)sp); | 116 | result = request_irq(sp->irq, ibmasm_interrupt_handler, IRQF_SHARED, sp->devname, (void*)sp); |
117 | if (result) { | 117 | if (result) { |
118 | dev_err(sp->dev, "Failed to register interrupt handler\n"); | 118 | dev_err(sp->dev, "Failed to register interrupt handler\n"); |
119 | goto error_request_irq; | 119 | goto error_request_irq; |