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

Commit e11c0316 authored by Prasad Malisetty's avatar Prasad Malisetty Committed by Shreyas Narayan
Browse files

mhi: core: remove unused dbgfs function



Remove unused debug function that trigger MSI

Change-Id: Ib747e579c732ece892f8695f2fdfbf107012c9c8
CRs-Fixed: 1116611
Signed-off-by: default avatarPrasad Malisetty <prasadm@codeaurora.org>
parent 49c36072
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);