From 2919c84446ec0343028488945b7ba39d8d0c4c68 Mon Sep 17 00:00:00 2001 From: Sekhar Nori Date: Thu, 3 Dec 2009 15:36:52 +0530 Subject: [PATCH] --- yaml --- r: 183199 b: refs/heads/master c: 2f72e8dcc5f528976a8cd631b44dffae0591612a h: refs/heads/master i: 183197: 634f4b4122c7932eba5b3633ac676c2d4f58f1bd 183195: bbd7c30766b034332734e0e11033704554934ab6 183191: 6b360fabc9e1eb38ed392b4e1d90ae088172746a 183183: 80cedfc25631487593e5ac85f779a48dc875d6f6 183167: 2757de75fec6f1e470a7de27ae4114160be6d4af v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-davinci/clock.c | 42 ++++++++--------------------- 2 files changed, 12 insertions(+), 32 deletions(-) diff --git a/[refs] b/[refs] index 137f93928e9a..c50c9b388ee1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f979aa6e17fe11fb7b603992c742898175327499 +refs/heads/master: 2f72e8dcc5f528976a8cd631b44dffae0591612a diff --git a/trunk/arch/arm/mach-davinci/clock.c b/trunk/arch/arm/mach-davinci/clock.c index 2c27caefa62e..a19bab18318a 100644 --- a/trunk/arch/arm/mach-davinci/clock.c +++ b/trunk/arch/arm/mach-davinci/clock.c @@ -459,24 +459,10 @@ int __init davinci_clk_init(struct davinci_clk *clocks) return 0; } -#ifdef CONFIG_PROC_FS -#include -#include - -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 +#include #define CLKNAME_MAX 10 /* longest clock name */ #define NEST_DELTA 2 @@ -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 */