Skip to content

Commit 174e7d0

Browse files
jhovoldgregkh
authored andcommitted
Revert "usb: typec: ucsi: Enable debugfs for message_out data structure"
This reverts commit 775fae5. The new buffer management code that this relies on is broken so revert for now. It also looks like the error handling needs some more thought as the message out size is not reset on errors. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20251222152204.2846-3-johan@kernel.org
1 parent 784b756 commit 174e7d0

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

drivers/usb/typec/ucsi/debugfs.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -110,30 +110,6 @@ static int ucsi_vbus_volt_show(struct seq_file *m, void *v)
110110
}
111111
DEFINE_SHOW_ATTRIBUTE(ucsi_vbus_volt);
112112

113-
static ssize_t ucsi_message_out_write(struct file *file,
114-
const char __user *data, size_t count, loff_t *ppos)
115-
{
116-
struct ucsi *ucsi = file->private_data;
117-
int ret;
118-
119-
char *buf __free(kfree) = memdup_user_nul(data, count);
120-
if (IS_ERR(buf))
121-
return PTR_ERR(buf);
122-
123-
ucsi->message_out_size = min(count / 2, UCSI_MAX_MESSAGE_OUT_LENGTH);
124-
ret = hex2bin(ucsi->message_out, buf, ucsi->message_out_size);
125-
if (ret)
126-
return ret;
127-
128-
return count;
129-
}
130-
131-
static const struct file_operations ucsi_message_out_fops = {
132-
.open = simple_open,
133-
.write = ucsi_message_out_write,
134-
.llseek = generic_file_llseek,
135-
};
136-
137113
void ucsi_debugfs_register(struct ucsi *ucsi)
138114
{
139115
ucsi->debugfs = kzalloc(sizeof(*ucsi->debugfs), GFP_KERNEL);
@@ -146,8 +122,6 @@ void ucsi_debugfs_register(struct ucsi *ucsi)
146122
debugfs_create_file("peak_current", 0400, ucsi->debugfs->dentry, ucsi, &ucsi_peak_curr_fops);
147123
debugfs_create_file("avg_current", 0400, ucsi->debugfs->dentry, ucsi, &ucsi_avg_curr_fops);
148124
debugfs_create_file("vbus_voltage", 0400, ucsi->debugfs->dentry, ucsi, &ucsi_vbus_volt_fops);
149-
debugfs_create_file("message_out", 0200, ucsi->debugfs->dentry, ucsi,
150-
&ucsi_message_out_fops);
151125
}
152126

153127
void ucsi_debugfs_unregister(struct ucsi *ucsi)

0 commit comments

Comments
 (0)