]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
arm: tegra: delete the debugfs sys entry for suspend
authorVandana Salve <vsalve@nvidia.com>
Wed, 28 Dec 2011 15:47:54 +0000 (21:17 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 07:58:48 +0000 (00:58 -0700)
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>
Rebase-Id: R3622a0a9ca159aef45155a45ff8ea0a12c308f33

arch/arm/mach-tegra/pm.c

index 7c936fa1f825efb00f98c1787bb10a06b548ffa8..1fb988ce951ed40562d26811687409463b53c106 100644 (file)
@@ -1214,67 +1214,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 *)&current_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