/* Copyright (c) 2012-2013, 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
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
#ifndef _SPMI_DBGFS_H
#define _SPMI_DBGFS_H

#include <linux/debugfs.h>

#ifdef CONFIG_DEBUG_FS
int spmi_dfs_add_controller(struct spmi_controller *ctrl);
int spmi_dfs_del_controller(struct spmi_controller *ctrl);
#else
static inline int spmi_dfs_add_controller(struct spmi_controller *ctrl)
{
	return 0;
}
static inline int spmi_dfs_del_controller(struct spmi_controller *ctrl)
{
	return 0;
}
#endif

struct dentry *spmi_dfs_create_file(struct spmi_controller *ctrl,
					const char *name, void *data,
					const struct file_operations *fops);

#endif /* _SPMI_DBGFS_H */

/* Copyright (c) 2012-2013, 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
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
#ifndef _SPMI_DBGFS_H
#define _SPMI_DBGFS_H

#include <linux/debugfs.h>

#ifdef CONFIG_DEBUG_FS
int spmi_dfs_add_controller(struct spmi_controller *ctrl);
int spmi_dfs_del_controller(struct spmi_controller *ctrl);
struct dentry *spmi_dfs_create_file(struct spmi_controller *ctrl,
					const char *name, void *data,
					const struct file_operations *fops);
#else
static inline int spmi_dfs_add_controller(struct spmi_controller *ctrl)
{
	return 0;
}
static inline int spmi_dfs_del_controller(struct spmi_controller *ctrl)
{
	return 0;
}

static inline struct dentry *spmi_dfs_create_file(struct spmi_controller *ctrl,
					const char *name, void *data,
					const struct file_operations *fops)
{
	return 0;
}
#endif

#endif /* _SPMI_DBGFS_H */

Fix compilation error when debugfs is disabled
spmi: Fix compilation error when debugfs is disabled

Code does not compile with debugfs disabled. Fix this.

Change-Id: I11fa09401f29e9f2fb65d19668cae455253f6355
Signed-off-by: Olav Haugan <fbf4ddd114d5f0aa83cb721b7dacab8a264ccf22@codeaurora.org>
