diff options
author | Vandana Salve <vsalve@nvidia.com> | 2011-12-28 21:17:54 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-01-04 11:45:17 +0530 |
commit | 3beafd3f1ed49f96258e46accb108eaebd462881 (patch) | |
tree | 17edf985ab29a0d44ef764447466f6f047b27e34 /arch | |
parent | a724ce54039cdef7c34ba969b87f075d659e4475 (diff) |
arm: tegra: delete the debugfs sys entry for suspend
Deleted the tegra debugfs /sys entry. Instead have a unified
/sys/power/suspend/mode sysfs entry to set the suspend state.
Bug 911096
Change-Id: I280eb0ed0f5c8b46c2147d84c27b1cf728078709
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/72419
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/pm.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c index 3fe9e2fd41c8..edcb28304d41 100644 --- a/arch/arm/mach-tegra/pm.c +++ b/arch/arm/mach-tegra/pm.c @@ -1242,67 +1242,3 @@ static int tegra_debug_uart_syscore_init(void) return 0; } arch_initcall(tegra_debug_uart_syscore_init); - -#ifdef CONFIG_DEBUG_FS -static int tegra_suspend_debug_show(struct seq_file *s, void *data) -{ - seq_printf(s, "%s\n", tegra_suspend_name[*(int *)s->private]); - return 0; -} - -static int tegra_suspend_debug_open(struct inode *inode, struct file *file) -{ - return single_open(file, tegra_suspend_debug_show, inode->i_private); -} - -static int tegra_suspend_debug_write(struct file *file, - const char __user *user_buf, size_t count, loff_t *ppos) -{ - char buf[32]; - int buf_size; - int i; - struct seq_file *s = file->private_data; - enum tegra_suspend_mode *val = s->private; - - memset(buf, 0x00, sizeof(buf)); - buf_size = min(count, (sizeof(buf)-1)); - if (copy_from_user(buf, user_buf, buf_size)) - return -EFAULT; - - for (i = 0; i < TEGRA_MAX_SUSPEND_MODE; i++) { - if (!strnicmp(buf, tegra_suspend_name[i], - strlen(tegra_suspend_name[i]))) { - if (i > pdata->suspend_mode) - return -EINVAL; - *val = i; - return count; - } - } - - return -EINVAL; -} - -static const struct file_operations tegra_suspend_debug_fops = { - .open = tegra_suspend_debug_open, - .write = tegra_suspend_debug_write, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -static int __init tegra_suspend_debug_init(void) -{ - struct dentry *d; - - d = debugfs_create_file("suspend_mode", 0755, NULL, - (void *)¤t_suspend_mode, &tegra_suspend_debug_fops); - if (!d) { - pr_info("Failed to create suspend_mode debug file\n"); - return -ENOMEM; - } - - return 0; -} - -late_initcall(tegra_suspend_debug_init); -#endif |