forked from Minki/linux
16eb9c0aae
Without it, the build system complains that it was declared inside the parameter list. Fixes the following W=1 kernel build warning(s): In file included from drivers/usb/mtu3/mtu3_trace.c:11: drivers/usb/mtu3/mtu3_debug.h:29:36: warning: ‘struct ssusb_mtk’ declared inside parameter list will not be visible outside of this definition or declaration 29 | void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb); | ^~~~~~~~~ drivers/usb/mtu3/mtu3_debug.h:30:35: warning: ‘struct ssusb_mtk’ declared inside parameter list will not be visible outside of this definition or declaration 30 | void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb); | ^~~~~~~~~ drivers/usb/mtu3/mtu3_debug.h:31:39: warning: ‘struct ssusb_mtk’ declared inside parameter list will not be visible outside of this definition or declaration 31 | void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb); | ^~~~~~~~~ drivers/usb/mtu3/mtu3_debug.h:32:39: warning: ‘struct ssusb_mtk’ declared inside parameter list will not be visible outside of this definition or declaration 32 | void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb); | ^~~~~~~~~ Cc: Chunfeng Yun <chunfeng.yun@mediatek.com> Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200703174148.2749969-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
53 lines
1.3 KiB
C
53 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* mtu3_debug.h - debug header
|
|
*
|
|
* Copyright (C) 2019 MediaTek Inc.
|
|
*
|
|
* Author: Chunfeng Yun <chunfeng.yun@mediatek.com>
|
|
*/
|
|
|
|
#ifndef __MTU3_DEBUG_H__
|
|
#define __MTU3_DEBUG_H__
|
|
|
|
#include <linux/debugfs.h>
|
|
|
|
struct ssusb_mtk;
|
|
|
|
#define MTU3_DEBUGFS_NAME_LEN 32
|
|
|
|
struct mtu3_regset {
|
|
char name[MTU3_DEBUGFS_NAME_LEN];
|
|
struct debugfs_regset32 regset;
|
|
size_t nregs;
|
|
};
|
|
|
|
struct mtu3_file_map {
|
|
const char *name;
|
|
int (*show)(struct seq_file *s, void *unused);
|
|
};
|
|
|
|
#if IS_ENABLED(CONFIG_DEBUG_FS)
|
|
void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb);
|
|
void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb);
|
|
void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb);
|
|
void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb);
|
|
|
|
#else
|
|
static inline void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb) {}
|
|
static inline void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb) {}
|
|
static inline void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb) {}
|
|
static inline void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb) {}
|
|
|
|
#endif /* CONFIG_DEBUG_FS */
|
|
|
|
#if IS_ENABLED(CONFIG_TRACING)
|
|
void mtu3_dbg_trace(struct device *dev, const char *fmt, ...);
|
|
|
|
#else
|
|
static inline void mtu3_dbg_trace(struct device *dev, const char *fmt, ...) {}
|
|
|
|
#endif /* CONFIG_TRACING */
|
|
|
|
#endif /* __MTU3_DEBUG_H__ */
|