aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/clock.c
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2009-12-03 05:06:52 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-02-04 16:29:46 -0500
commit2f72e8dcc5f528976a8cd631b44dffae0591612a (patch)
treebddce29c4713730ef7d2bad39529da36d85cb2ae /arch/arm/mach-davinci/clock.c
parentf979aa6e17fe11fb7b603992c742898175327499 (diff)
davinci: move /proc/davinci_clocks to debugfs
Move /proc/davinci_clocks to /sys/kernel/debug/davinci_clocks (debugfs). debugfs is more suited for this since the clock dump is debug information. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/clock.c')
-rw-r--r--arch/arm/mach-davinci/clock.c42
1 files changed, 11 insertions, 31 deletions
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index 2c27caefa62e..a19bab18318a 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -459,24 +459,10 @@ int __init davinci_clk_init(struct davinci_clk *clocks)
459 return 0; 459 return 0;
460} 460}
461 461
462#ifdef CONFIG_PROC_FS 462#ifdef CONFIG_DEBUG_FS
463#include <linux/proc_fs.h>
464#include <linux/seq_file.h>
465
466static void *davinci_ck_start(struct seq_file *m, loff_t *pos)
467{
468 return *pos < 1 ? (void *)1 : NULL;
469}
470
471static void *davinci_ck_next(struct seq_file *m, void *v, loff_t *pos)
472{
473 ++*pos;
474 return NULL;
475}
476 463
477static void davinci_ck_stop(struct seq_file *m, void *v) 464#include <linux/debugfs.h>
478{ 465#include <linux/seq_file.h>
479}
480 466
481#define CLKNAME_MAX 10 /* longest clock name */ 467#define CLKNAME_MAX 10 /* longest clock name */
482#define NEST_DELTA 2 468#define NEST_DELTA 2
@@ -530,30 +516,24 @@ static int davinci_ck_show(struct seq_file *m, void *v)
530 return 0; 516 return 0;
531} 517}
532 518
533static const struct seq_operations davinci_ck_op = {
534 .start = davinci_ck_start,
535 .next = davinci_ck_next,
536 .stop = davinci_ck_stop,
537 .show = davinci_ck_show
538};
539
540static int davinci_ck_open(struct inode *inode, struct file *file) 519static int davinci_ck_open(struct inode *inode, struct file *file)
541{ 520{
542 return seq_open(file, &davinci_ck_op); 521 return single_open(file, davinci_ck_show, NULL);
543} 522}
544 523
545static const struct file_operations proc_davinci_ck_operations = { 524static const struct file_operations davinci_ck_operations = {
546 .open = davinci_ck_open, 525 .open = davinci_ck_open,
547 .read = seq_read, 526 .read = seq_read,
548 .llseek = seq_lseek, 527 .llseek = seq_lseek,
549 .release = seq_release, 528 .release = single_release,
550}; 529};
551 530
552static int __init davinci_ck_proc_init(void) 531static int __init davinci_clk_debugfs_init(void)
553{ 532{
554 proc_create("davinci_clocks", 0, NULL, &proc_davinci_ck_operations); 533 debugfs_create_file("davinci_clocks", S_IFREG | S_IRUGO, NULL, NULL,
534 &davinci_ck_operations);
555 return 0; 535 return 0;
556 536
557} 537}
558__initcall(davinci_ck_proc_init); 538device_initcall(davinci_clk_debugfs_init);
559#endif /* CONFIG_DEBUG_PROC_FS */ 539#endif /* CONFIG_DEBUG_FS */