diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /drivers/usb/chipidea/debug.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'drivers/usb/chipidea/debug.c')
| -rw-r--r-- | drivers/usb/chipidea/debug.c | 55 | 
1 files changed, 0 insertions, 55 deletions
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index bbc610e5bd69..e72c43615d77 100644 --- a/drivers/usb/chipidea/debug.c +++ b/drivers/usb/chipidea/debug.c @@ -247,60 +247,6 @@ static int ci_otg_show(struct seq_file *s, void *unused)  }  DEFINE_SHOW_ATTRIBUTE(ci_otg); -static int ci_role_show(struct seq_file *s, void *data) -{ -	struct ci_hdrc *ci = s->private; - -	if (ci->role != CI_ROLE_END) -		seq_printf(s, "%s\n", ci_role(ci)->name); - -	return 0; -} - -static ssize_t ci_role_write(struct file *file, const char __user *ubuf, -			     size_t count, loff_t *ppos) -{ -	struct seq_file *s = file->private_data; -	struct ci_hdrc *ci = s->private; -	enum ci_role role; -	char buf[8]; -	int ret; - -	if (copy_from_user(buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) -		return -EFAULT; - -	for (role = CI_ROLE_HOST; role < CI_ROLE_END; role++) -		if (ci->roles[role] && -		    !strncmp(buf, ci->roles[role]->name, -			     strlen(ci->roles[role]->name))) -			break; - -	if (role == CI_ROLE_END || role == ci->role) -		return -EINVAL; - -	pm_runtime_get_sync(ci->dev); -	disable_irq(ci->irq); -	ci_role_stop(ci); -	ret = ci_role_start(ci, role); -	enable_irq(ci->irq); -	pm_runtime_put_sync(ci->dev); - -	return ret ? ret : count; -} - -static int ci_role_open(struct inode *inode, struct file *file) -{ -	return single_open(file, ci_role_show, inode->i_private); -} - -static const struct file_operations ci_role_fops = { -	.open		= ci_role_open, -	.write		= ci_role_write, -	.read		= seq_read, -	.llseek		= seq_lseek, -	.release	= single_release, -}; -  static int ci_registers_show(struct seq_file *s, void *unused)  {  	struct ci_hdrc *ci = s->private; @@ -354,7 +300,6 @@ void dbg_create_files(struct ci_hdrc *ci)  	if (ci_otg_is_fsm_mode(ci))  		debugfs_create_file("otg", S_IRUGO, dir, ci, &ci_otg_fops); -	debugfs_create_file("role", S_IRUGO | S_IWUSR, dir, ci, &ci_role_fops);  	debugfs_create_file("registers", S_IRUGO, dir, ci, &ci_registers_fops);  }  |