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

Commit 1af7ad51 authored by Inaky Perez-Gonzalez's avatar Inaky Perez-Gonzalez Committed by David S. Miller
Browse files

wimax: fix build issue when debugfs is disabled

As reported by Toralf Förster and Randy Dunlap.

- http://linuxwimax.org/pipermail/wimax/2009-January/000460.html

- http://lkml.org/lkml/2009/1/29/279



The definitions needed for the wimax stack and i2400m driver debug
infrastructure was, by mistake, compiled depending on CONFIG_DEBUG_FS
(by them being placed in the debugfs.c files); thus the build broke in
2.6.29-rc3 when debugging was enabled (CONFIG_WIMAX_DEBUG) and
DEBUG_FS was disabled.

These definitions are always needed if debug is enabled at compile
time (independently of DEBUG_FS being or not enabled), so moving them
to a file that is always compiled fixes the issue.

Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 584dbe94
Loading
Loading
Loading
Loading
+0 −14
Original line number Original line Diff line number Diff line
@@ -234,20 +234,6 @@ struct dentry *debugfs_create_i2400m_reset(
				   &fops_i2400m_reset);
				   &fops_i2400m_reset);
}
}


/*
 * Debug levels control; see debug.h
 */
struct d_level D_LEVEL[] = {
	D_SUBMODULE_DEFINE(control),
	D_SUBMODULE_DEFINE(driver),
	D_SUBMODULE_DEFINE(debugfs),
	D_SUBMODULE_DEFINE(fw),
	D_SUBMODULE_DEFINE(netdev),
	D_SUBMODULE_DEFINE(rfkill),
	D_SUBMODULE_DEFINE(rx),
	D_SUBMODULE_DEFINE(tx),
};
size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL);


#define __debugfs_register(prefix, name, parent)			\
#define __debugfs_register(prefix, name, parent)			\
do {									\
do {									\
+16 −0
Original line number Original line Diff line number Diff line
@@ -707,6 +707,22 @@ void i2400m_release(struct i2400m *i2400m)
EXPORT_SYMBOL_GPL(i2400m_release);
EXPORT_SYMBOL_GPL(i2400m_release);




/*
 * Debug levels control; see debug.h
 */
struct d_level D_LEVEL[] = {
	D_SUBMODULE_DEFINE(control),
	D_SUBMODULE_DEFINE(driver),
	D_SUBMODULE_DEFINE(debugfs),
	D_SUBMODULE_DEFINE(fw),
	D_SUBMODULE_DEFINE(netdev),
	D_SUBMODULE_DEFINE(rfkill),
	D_SUBMODULE_DEFINE(rx),
	D_SUBMODULE_DEFINE(tx),
};
size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL);


static
static
int __init i2400m_driver_init(void)
int __init i2400m_driver_init(void)
{
{
+0 −11
Original line number Original line Diff line number Diff line
@@ -28,17 +28,6 @@
#include "debug-levels.h"
#include "debug-levels.h"




/* Debug framework control of debug levels */
struct d_level D_LEVEL[] = {
	D_SUBMODULE_DEFINE(debugfs),
	D_SUBMODULE_DEFINE(id_table),
	D_SUBMODULE_DEFINE(op_msg),
	D_SUBMODULE_DEFINE(op_reset),
	D_SUBMODULE_DEFINE(op_rfkill),
	D_SUBMODULE_DEFINE(stack),
};
size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL);

#define __debugfs_register(prefix, name, parent)			\
#define __debugfs_register(prefix, name, parent)			\
do {									\
do {									\
	result = d_level_register_debugfs(prefix, name, parent);	\
	result = d_level_register_debugfs(prefix, name, parent);	\
+13 −0
Original line number Original line Diff line number Diff line
@@ -516,6 +516,19 @@ void wimax_dev_rm(struct wimax_dev *wimax_dev)
}
}
EXPORT_SYMBOL_GPL(wimax_dev_rm);
EXPORT_SYMBOL_GPL(wimax_dev_rm);



/* Debug framework control of debug levels */
struct d_level D_LEVEL[] = {
	D_SUBMODULE_DEFINE(debugfs),
	D_SUBMODULE_DEFINE(id_table),
	D_SUBMODULE_DEFINE(op_msg),
	D_SUBMODULE_DEFINE(op_reset),
	D_SUBMODULE_DEFINE(op_rfkill),
	D_SUBMODULE_DEFINE(stack),
};
size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL);


struct genl_family wimax_gnl_family = {
struct genl_family wimax_gnl_family = {
	.id = GENL_ID_GENERATE,
	.id = GENL_ID_GENERATE,
	.name = "WiMAX",
	.name = "WiMAX",