Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: make reset debugfs depend on CONFIG_PM

The suspend/resume code depends on CONFIG_PM, so
the reset debugfs file can only be made available
if that is enabled.

Fengguang Wu's zero-day build testing found this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+4
+4
net/mac80211/debugfs.c
··· 70 70 DEBUGFS_READONLY_FILE(rate_ctrl_alg, "%s", 71 71 local->rate_ctrl ? local->rate_ctrl->ops->name : "hw/driver"); 72 72 73 + #ifdef CONFIG_PM 73 74 static ssize_t reset_write(struct file *file, const char __user *user_buf, 74 75 size_t count, loff_t *ppos) 75 76 { ··· 89 88 .open = simple_open, 90 89 .llseek = noop_llseek, 91 90 }; 91 + #endif 92 92 93 93 static ssize_t hwflags_read(struct file *file, char __user *user_buf, 94 94 size_t count, loff_t *ppos) ··· 247 245 DEBUGFS_ADD(total_ps_buffered); 248 246 DEBUGFS_ADD(wep_iv); 249 247 DEBUGFS_ADD(queues); 248 + #ifdef CONFIG_PM 250 249 DEBUGFS_ADD_MODE(reset, 0200); 250 + #endif 251 251 DEBUGFS_ADD(hwflags); 252 252 DEBUGFS_ADD(user_power); 253 253 DEBUGFS_ADD(power);