Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183199
b: refs/heads/master
c: 2f72e8d
h: refs/heads/master
i:
  183197: 634f4b4
  183195: bbd7c30
  183191: 6b360fa
  183183: 80cedfc
  183167: 2757de7
v: v3
  • Loading branch information
Sekhar Nori authored and Kevin Hilman committed Feb 4, 2010
1 parent 76e7479 commit 2919c84
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f979aa6e17fe11fb7b603992c742898175327499
refs/heads/master: 2f72e8dcc5f528976a8cd631b44dffae0591612a
42 changes: 11 additions & 31 deletions trunk/arch/arm/mach-davinci/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,24 +459,10 @@ int __init davinci_clk_init(struct davinci_clk *clocks)
return 0;
}

#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
#include <linux/seq_file.h>

static void *davinci_ck_start(struct seq_file *m, loff_t *pos)
{
return *pos < 1 ? (void *)1 : NULL;
}

static void *davinci_ck_next(struct seq_file *m, void *v, loff_t *pos)
{
++*pos;
return NULL;
}
#ifdef CONFIG_DEBUG_FS

static void davinci_ck_stop(struct seq_file *m, void *v)
{
}
#include <linux/debugfs.h>
#include <linux/seq_file.h>

#define CLKNAME_MAX 10 /* longest clock name */
#define NEST_DELTA 2
Expand Down Expand Up @@ -530,30 +516,24 @@ static int davinci_ck_show(struct seq_file *m, void *v)
return 0;
}

static const struct seq_operations davinci_ck_op = {
.start = davinci_ck_start,
.next = davinci_ck_next,
.stop = davinci_ck_stop,
.show = davinci_ck_show
};

static int davinci_ck_open(struct inode *inode, struct file *file)
{
return seq_open(file, &davinci_ck_op);
return single_open(file, davinci_ck_show, NULL);
}

static const struct file_operations proc_davinci_ck_operations = {
static const struct file_operations davinci_ck_operations = {
.open = davinci_ck_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
.release = single_release,
};

static int __init davinci_ck_proc_init(void)
static int __init davinci_clk_debugfs_init(void)
{
proc_create("davinci_clocks", 0, NULL, &proc_davinci_ck_operations);
debugfs_create_file("davinci_clocks", S_IFREG | S_IRUGO, NULL, NULL,
&davinci_ck_operations);
return 0;

}
__initcall(davinci_ck_proc_init);
#endif /* CONFIG_DEBUG_PROC_FS */
device_initcall(davinci_clk_debugfs_init);
#endif /* CONFIG_DEBUG_FS */

0 comments on commit 2919c84

Please sign in to comment.