]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/pseries/hvCall_inst.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / pseries / hvCall_inst.c
index 446e17d162a545e004c18779e61e8c5b4e398414..eae51ef9af2441c2b12660ad786e3a318e567436 100644 (file)
@@ -34,7 +34,7 @@ DEFINE_PER_CPU(struct hcall_stats[HCALL_STAT_ARRAY_SIZE], hcall_stats);
  */
 static void *hc_start(struct seq_file *m, loff_t *pos)
 {
-       if ((int)*pos < HCALL_STAT_ARRAY_SIZE)
+       if ((int)*pos < (HCALL_STAT_ARRAY_SIZE-1))
                return (void *)(unsigned long)(*pos + 1);
 
        return NULL;
@@ -57,7 +57,7 @@ static int hc_show(struct seq_file *m, void *p)
        struct hcall_stats *hs = (struct hcall_stats *)m->private;
 
        if (hs[h_num].num_calls) {
-               if (!cpu_has_feature(CPU_FTR_PURR))
+               if (cpu_has_feature(CPU_FTR_PURR))
                        seq_printf(m, "%lu %lu %lu %lu\n", h_num<<2,
                                   hs[h_num].num_calls,
                                   hs[h_num].tb_total,
@@ -85,12 +85,12 @@ static int hcall_inst_seq_open(struct inode *inode, struct file *file)
 
        rc = seq_open(file, &hcall_inst_seq_ops);
        seq = file->private_data;
-       seq->private = file->f_dentry->d_inode->i_private;
+       seq->private = file->f_path.dentry->d_inode->i_private;
 
        return rc;
 }
 
-static struct file_operations hcall_inst_seq_fops = {
+static const struct file_operations hcall_inst_seq_fops = {
        .open = hcall_inst_seq_open,
        .read = seq_read,
        .llseek = seq_lseek,