Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9400b601 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mhi: core: remove unused dbgfs function"

parents 6ab1d7a3 e11c0316
Loading
Loading
Loading
Loading
+1 −27
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -187,22 +187,6 @@ static const struct file_operations mhi_dbgfs_ev_fops = {
	.write = NULL,
};

static ssize_t mhi_dbgfs_trigger_msi(struct file *fp, const char __user *buf,
				size_t count, loff_t *offp)
{
	u32 msi_nr = 0;
	void *irq_ctxt = &((mhi_devices.device_list[0]).pcie_device->dev);
	if (copy_from_user(&msi_nr, buf, sizeof(msi_nr)))
		return -ENOMEM;
	mhi_msi_handlr(msi_nr, irq_ctxt);
	return 0;
}

static const struct file_operations mhi_dbgfs_trigger_msi_fops = {
	.read = NULL,
	.write = mhi_dbgfs_trigger_msi,
};

static ssize_t mhi_dbgfs_state_read(struct file *fp, char __user *buf,
				size_t count, loff_t *offp)
{
@@ -311,7 +295,6 @@ int mhi_init_debugfs(struct mhi_device_ctxt *mhi_dev_ctxt)
{
	struct dentry *mhi_chan_stats;
	struct dentry *mhi_state_stats;
	struct dentry *mhi_msi_trigger;
	struct dentry *mhi_ev_stats;
	mhi_dev_ctxt->mhi_parent_folder =
					debugfs_create_dir("mhi", NULL);
@@ -340,21 +323,12 @@ int mhi_init_debugfs(struct mhi_device_ctxt *mhi_dev_ctxt)
					&mhi_dbgfs_state_fops);
	if (mhi_state_stats == NULL)
		goto clean_ev_stats;
	mhi_msi_trigger = debugfs_create_file("mhi_msi_trigger",
					0444,
					mhi_dev_ctxt->mhi_parent_folder,
					mhi_dev_ctxt,
					&mhi_dbgfs_trigger_msi_fops);
	if (mhi_msi_trigger == NULL)
		goto clean_state;

	mhi_dev_ctxt->chan_info = kmalloc(MHI_LOG_SIZE, GFP_KERNEL);
	if (mhi_dev_ctxt->chan_info == NULL)
		goto clean_all;
	return 0;
clean_all:
	debugfs_remove(mhi_msi_trigger);
clean_state:
	debugfs_remove(mhi_state_stats);
clean_ev_stats:
	debugfs_remove(mhi_ev_stats);