]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kernel/salinfo.c
Merge branch 'irq-cleanups-upstream' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / arch / ia64 / kernel / salinfo.c
index e63b8ca5344a202d85b8cb1d25a4edb08c486894..b11bb50a197a68ff8aa5f8661ef7552618940c56 100644 (file)
 #include <linux/proc_fs.h>
 #include <linux/module.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/timer.h>
 #include <linux/vmalloc.h>
+#include <linux/semaphore.h>
 
-#include <asm/semaphore.h>
 #include <asm/sal.h>
 #include <asm/uaccess.h>
 
@@ -163,7 +162,7 @@ static DEFINE_SPINLOCK(data_saved_lock);
 /** salinfo_platform_oemdata - optional callback to decode oemdata from an error
  * record.
  * @sect_header: pointer to the start of the section to decode.
- * @oemdata: returns vmalloc area containing the decded output.
+ * @oemdata: returns vmalloc area containing the decoded output.
  * @oemdata_size: returns length of decoded output (strlen).
  *
  * Description: If user space asks for oem data to be decoded by the kernel
@@ -302,7 +301,7 @@ salinfo_event_open(struct inode *inode, struct file *file)
 static ssize_t
 salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
 {
-       struct inode *inode = file->f_dentry->d_inode;
+       struct inode *inode = file->f_path.dentry->d_inode;
        struct proc_dir_entry *entry = PDE(inode);
        struct salinfo_data *data = entry->data;
        char cmd[32];
@@ -352,7 +351,7 @@ retry:
        return size;
 }
 
-static struct file_operations salinfo_event_fops = {
+static const struct file_operations salinfo_event_fops = {
        .open  = salinfo_event_open,
        .read  = salinfo_event_read,
 };
@@ -464,7 +463,7 @@ retry:
 static ssize_t
 salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
 {
-       struct inode *inode = file->f_dentry->d_inode;
+       struct inode *inode = file->f_path.dentry->d_inode;
        struct proc_dir_entry *entry = PDE(inode);
        struct salinfo_data *data = entry->data;
        u8 *buf;
@@ -525,7 +524,7 @@ salinfo_log_clear(struct salinfo_data *data, int cpu)
 static ssize_t
 salinfo_log_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
 {
-       struct inode *inode = file->f_dentry->d_inode;
+       struct inode *inode = file->f_path.dentry->d_inode;
        struct proc_dir_entry *entry = PDE(inode);
        struct salinfo_data *data = entry->data;
        char cmd[32];
@@ -568,15 +567,14 @@ salinfo_log_write(struct file *file, const char __user *buffer, size_t count, lo
        return count;
 }
 
-static struct file_operations salinfo_data_fops = {
+static const struct file_operations salinfo_data_fops = {
        .open    = salinfo_log_open,
        .release = salinfo_log_release,
        .read    = salinfo_log_read,
        .write   = salinfo_log_write,
 };
 
-#ifdef CONFIG_HOTPLUG_CPU
-static int __devinit
+static int __cpuinit
 salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
 {
        unsigned int i, cpu = (unsigned long)hcpu;
@@ -584,6 +582,7 @@ salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu
        struct salinfo_data *data;
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                spin_lock_irqsave(&data_saved_lock, flags);
                for (i = 0, data = salinfo_data;
                     i < ARRAY_SIZE(salinfo_data);
@@ -594,6 +593,7 @@ salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu
                spin_unlock_irqrestore(&data_saved_lock, flags);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                spin_lock_irqsave(&data_saved_lock, flags);
                for (i = 0, data = salinfo_data;
                     i < ARRAY_SIZE(salinfo_data);
@@ -615,12 +615,11 @@ salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu
        return NOTIFY_OK;
 }
 
-static struct notifier_block salinfo_cpu_notifier =
+static struct notifier_block salinfo_cpu_notifier __cpuinitdata =
 {
        .notifier_call = salinfo_cpu_callback,
        .priority = 0,
 };
-#endif /* CONFIG_HOTPLUG_CPU */
 
 static int __init
 salinfo_init(void)