mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
tree-wide: replace config_enabled() with IS_ENABLED()
The use of config_enabled() against config options is ambiguous. In practical terms, config_enabled() is equivalent to IS_BUILTIN(), but the author might have used it for the meaning of IS_ENABLED(). Using IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc. makes the intention clearer. This commit replaces config_enabled() with IS_ENABLED() where possible. This commit is only touching bool config options. I noticed two cases where config_enabled() is used against a tristate option: - config_enabled(CONFIG_HWMON) [ drivers/net/wireless/ath/ath10k/thermal.c ] - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE) [ drivers/gpu/drm/gma500/opregion.c ] I did not touch them because they should be converted to IS_BUILTIN() in order to keep the logic, but I was not sure it was the authors' intention. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Kees Cook <[email protected]> Cc: Stas Sergeev <[email protected]> Cc: Matt Redfearn <[email protected]> Cc: Joshua Kinard <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Markos Chandras <[email protected]> Cc: "Dmitry V. Levin" <[email protected]> Cc: yu-cheng yu <[email protected]> Cc: James Hogan <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Johannes Berg <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Al Viro <[email protected]> Cc: Will Drewry <[email protected]> Cc: Nikolay Martynov <[email protected]> Cc: Huacai Chen <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Daniel Borkmann <[email protected]> Cc: Leonid Yegoshin <[email protected]> Cc: Rafal Milecki <[email protected]> Cc: James Cowgill <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Alex Smith <[email protected]> Cc: Adam Buchbinder <[email protected]> Cc: Qais Yousef <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Mikko Rapeli <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: Brian Norris <[email protected]> Cc: Hidehiro Kawai <[email protected]> Cc: "Luis R. Rodriguez" <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Dave Hansen <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: Roland McGrath <[email protected]> Cc: Paul Burton <[email protected]> Cc: Kalle Valo <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Tony Wu <[email protected]> Cc: Huaitong Han <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Jason Cooper <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Andrea Gelmini <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Rabin Vincent <[email protected]> Cc: "Maciej W. Rozycki" <[email protected]> Cc: David Daney <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
1c8cb40949
commit
97f2645f35
48 changed files with 135 additions and 135 deletions
|
|
@ -139,11 +139,11 @@ void ath10k_debug_print_hwfw_info(struct ath10k *ar)
|
|||
ar->id.subsystem_vendor, ar->id.subsystem_device);
|
||||
|
||||
ath10k_info(ar, "kconfig debug %d debugfs %d tracing %d dfs %d testmode %d\n",
|
||||
config_enabled(CONFIG_ATH10K_DEBUG),
|
||||
config_enabled(CONFIG_ATH10K_DEBUGFS),
|
||||
config_enabled(CONFIG_ATH10K_TRACING),
|
||||
config_enabled(CONFIG_ATH10K_DFS_CERTIFIED),
|
||||
config_enabled(CONFIG_NL80211_TESTMODE));
|
||||
IS_ENABLED(CONFIG_ATH10K_DEBUG),
|
||||
IS_ENABLED(CONFIG_ATH10K_DEBUGFS),
|
||||
IS_ENABLED(CONFIG_ATH10K_TRACING),
|
||||
IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED),
|
||||
IS_ENABLED(CONFIG_NL80211_TESTMODE));
|
||||
|
||||
firmware = ar->normal_mode_fw.fw_file.firmware;
|
||||
if (firmware)
|
||||
|
|
@ -2424,7 +2424,7 @@ int ath10k_debug_register(struct ath10k *ar)
|
|||
debugfs_create_file("nf_cal_period", S_IRUSR | S_IWUSR,
|
||||
ar->debug.debugfs_phy, ar, &fops_nf_cal_period);
|
||||
|
||||
if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED)) {
|
||||
if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED)) {
|
||||
debugfs_create_file("dfs_simulate_radar", S_IWUSR,
|
||||
ar->debug.debugfs_phy, ar,
|
||||
&fops_simulate_radar);
|
||||
|
|
|
|||
|
|
@ -3039,7 +3039,7 @@ static void ath10k_regd_update(struct ath10k *ar)
|
|||
|
||||
regpair = ar->ath_common.regulatory.regpair;
|
||||
|
||||
if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
|
||||
if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
|
||||
nl_dfs_reg = ar->dfs_detector->region;
|
||||
wmi_dfs_reg = ath10k_mac_get_dfs_region(nl_dfs_reg);
|
||||
} else {
|
||||
|
|
@ -3068,7 +3068,7 @@ static void ath10k_reg_notifier(struct wiphy *wiphy,
|
|||
|
||||
ath_reg_notifier_apply(wiphy, request, &ar->ath_common.regulatory);
|
||||
|
||||
if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
|
||||
if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
|
||||
ath10k_dbg(ar, ATH10K_DBG_REGULATORY, "dfs region 0x%x\n",
|
||||
request->dfs_region);
|
||||
result = ar->dfs_detector->set_dfs_domain(ar->dfs_detector,
|
||||
|
|
@ -7955,7 +7955,7 @@ int ath10k_mac_register(struct ath10k *ar)
|
|||
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))
|
||||
ar->hw->netdev_features = NETIF_F_HW_CSUM;
|
||||
|
||||
if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED)) {
|
||||
if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED)) {
|
||||
/* Init ath dfs pattern detector */
|
||||
ar->ath_common.debug_mask = ATH_DBG_DFS;
|
||||
ar->dfs_detector = dfs_pattern_detector_init(&ar->ath_common,
|
||||
|
|
@ -8003,7 +8003,7 @@ err_unregister:
|
|||
ieee80211_unregister_hw(ar->hw);
|
||||
|
||||
err_dfs_detector_exit:
|
||||
if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
|
||||
if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
|
||||
ar->dfs_detector->exit(ar->dfs_detector);
|
||||
|
||||
err_free:
|
||||
|
|
@ -8018,7 +8018,7 @@ void ath10k_mac_unregister(struct ath10k *ar)
|
|||
{
|
||||
ieee80211_unregister_hw(ar->hw);
|
||||
|
||||
if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
|
||||
if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
|
||||
ar->dfs_detector->exit(ar->dfs_detector);
|
||||
|
||||
kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels);
|
||||
|
|
|
|||
|
|
@ -3704,7 +3704,7 @@ void ath10k_wmi_event_dfs(struct ath10k *ar,
|
|||
phyerr->tsf_timestamp, tsf, buf_len);
|
||||
|
||||
/* Skip event if DFS disabled */
|
||||
if (!config_enabled(CONFIG_ATH10K_DFS_CERTIFIED))
|
||||
if (!IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED))
|
||||
return;
|
||||
|
||||
ATH10K_DFS_STAT_INC(ar, pulses_total);
|
||||
|
|
|
|||
|
|
@ -3881,7 +3881,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
|
|||
BIT(NL80211_IFTYPE_P2P_CLIENT);
|
||||
}
|
||||
|
||||
if (config_enabled(CONFIG_ATH6KL_REGDOMAIN) &&
|
||||
if (IS_ENABLED(CONFIG_ATH6KL_REGDOMAIN) &&
|
||||
test_bit(ATH6KL_FW_CAPABILITY_REGDOMAIN, ar->fw_capabilities)) {
|
||||
wiphy->reg_notifier = ath6kl_cfg80211_reg_notify;
|
||||
ar->wiphy->features |= NL80211_FEATURE_CELL_BASE_REG_HINTS;
|
||||
|
|
|
|||
|
|
@ -731,7 +731,7 @@ void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,
|
|||
struct ath_hw *ah = spec_priv->ah;
|
||||
u32 rxfilter;
|
||||
|
||||
if (config_enabled(CONFIG_ATH9K_TX99))
|
||||
if (IS_ENABLED(CONFIG_ATH9K_TX99))
|
||||
return;
|
||||
|
||||
if (!ath9k_hw_ops(ah)->spectral_scan_trigger) {
|
||||
|
|
@ -806,7 +806,7 @@ static ssize_t write_file_spec_scan_ctl(struct file *file,
|
|||
char buf[32];
|
||||
ssize_t len;
|
||||
|
||||
if (config_enabled(CONFIG_ATH9K_TX99))
|
||||
if (IS_ENABLED(CONFIG_ATH9K_TX99))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
len = min(count, sizeof(buf) - 1);
|
||||
|
|
@ -1072,7 +1072,7 @@ static struct rchan_callbacks rfs_spec_scan_cb = {
|
|||
|
||||
void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)
|
||||
{
|
||||
if (config_enabled(CONFIG_ATH9K_DEBUGFS)) {
|
||||
if (IS_ENABLED(CONFIG_ATH9K_DEBUGFS)) {
|
||||
relay_close(spec_priv->rfs_chan_spec_scan);
|
||||
spec_priv->rfs_chan_spec_scan = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
|||
NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
|
||||
NL80211_FEATURE_P2P_GO_CTWIN;
|
||||
|
||||
if (!config_enabled(CONFIG_ATH9K_TX99)) {
|
||||
if (!IS_ENABLED(CONFIG_ATH9K_TX99)) {
|
||||
hw->wiphy->interface_modes =
|
||||
BIT(NL80211_IFTYPE_P2P_GO) |
|
||||
BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
|
|
|
|||
|
|
@ -1250,7 +1250,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
|
|||
|
||||
mutex_lock(&sc->mutex);
|
||||
|
||||
if (config_enabled(CONFIG_ATH9K_TX99)) {
|
||||
if (IS_ENABLED(CONFIG_ATH9K_TX99)) {
|
||||
if (sc->cur_chan->nvifs >= 1) {
|
||||
mutex_unlock(&sc->mutex);
|
||||
return -EOPNOTSUPP;
|
||||
|
|
@ -1300,7 +1300,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
|
|||
|
||||
mutex_lock(&sc->mutex);
|
||||
|
||||
if (config_enabled(CONFIG_ATH9K_TX99)) {
|
||||
if (IS_ENABLED(CONFIG_ATH9K_TX99)) {
|
||||
mutex_unlock(&sc->mutex);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
|
@ -1360,7 +1360,7 @@ static void ath9k_enable_ps(struct ath_softc *sc)
|
|||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
|
||||
if (config_enabled(CONFIG_ATH9K_TX99))
|
||||
if (IS_ENABLED(CONFIG_ATH9K_TX99))
|
||||
return;
|
||||
|
||||
sc->ps_enabled = true;
|
||||
|
|
@ -1379,7 +1379,7 @@ static void ath9k_disable_ps(struct ath_softc *sc)
|
|||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
|
||||
if (config_enabled(CONFIG_ATH9K_TX99))
|
||||
if (IS_ENABLED(CONFIG_ATH9K_TX99))
|
||||
return;
|
||||
|
||||
sc->ps_enabled = false;
|
||||
|
|
@ -1953,7 +1953,7 @@ static int ath9k_get_survey(struct ieee80211_hw *hw, int idx,
|
|||
struct ieee80211_channel *chan;
|
||||
int pos;
|
||||
|
||||
if (config_enabled(CONFIG_ATH9K_TX99))
|
||||
if (IS_ENABLED(CONFIG_ATH9K_TX99))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
spin_lock_bh(&common->cc_lock);
|
||||
|
|
@ -2003,7 +2003,7 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw,
|
|||
struct ath_softc *sc = hw->priv;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
|
||||
if (config_enabled(CONFIG_ATH9K_TX99))
|
||||
if (IS_ENABLED(CONFIG_ATH9K_TX99))
|
||||
return;
|
||||
|
||||
mutex_lock(&sc->mutex);
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
|
|||
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
u32 rfilt;
|
||||
|
||||
if (config_enabled(CONFIG_ATH9K_TX99))
|
||||
if (IS_ENABLED(CONFIG_ATH9K_TX99))
|
||||
return 0;
|
||||
|
||||
rfilt = ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ dfs_pattern_detector_init(struct ath_common *common,
|
|||
{
|
||||
struct dfs_pattern_detector *dpd;
|
||||
|
||||
if (!config_enabled(CONFIG_CFG80211_CERTIFICATION_ONUS))
|
||||
if (!IS_ENABLED(CONFIG_CFG80211_CERTIFICATION_ONUS))
|
||||
return NULL;
|
||||
|
||||
dpd = kmalloc(sizeof(*dpd), GFP_KERNEL);
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ static const struct ieee80211_regdomain ath_world_regdom_67_68_6A_6C = {
|
|||
|
||||
static bool dynamic_country_user_possible(struct ath_regulatory *reg)
|
||||
{
|
||||
if (config_enabled(CONFIG_ATH_REG_DYNAMIC_USER_CERT_TESTING))
|
||||
if (IS_ENABLED(CONFIG_ATH_REG_DYNAMIC_USER_CERT_TESTING))
|
||||
return true;
|
||||
|
||||
switch (reg->country_code) {
|
||||
|
|
@ -188,7 +188,7 @@ static bool dynamic_country_user_possible(struct ath_regulatory *reg)
|
|||
|
||||
static bool ath_reg_dyn_country_user_allow(struct ath_regulatory *reg)
|
||||
{
|
||||
if (!config_enabled(CONFIG_ATH_REG_DYNAMIC_USER_REG_HINTS))
|
||||
if (!IS_ENABLED(CONFIG_ATH_REG_DYNAMIC_USER_REG_HINTS))
|
||||
return false;
|
||||
if (!dynamic_country_user_possible(reg))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue