Skip to content

Commit

Permalink
Use IS_ENABLED macro to test for Kconfig symbols.
Browse files Browse the repository at this point in the history
Signed-off-by: David Lin <dlin@marvell.com>
  • Loading branch information
yuhhaurlin committed Nov 10, 2016
1 parent 2aca3db commit ee0d12c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion thermal.c
Expand Up @@ -147,7 +147,7 @@ int mwl_thermal_register(struct mwl_priv *priv)
priv->cdev = cdev;
priv->quiet_period = SYSADPT_QUIET_PERIOD_DEFAULT;

if (!config_enabled(CONFIG_HWMON))
if (!IS_ENABLED(CONFIG_HWMON))
return 0;

hwmon_dev =
Expand Down
4 changes: 3 additions & 1 deletion thermal.h
Expand Up @@ -18,7 +18,9 @@
#ifndef _THERMAL_H_
#define _THERMAL_H_

#ifdef CONFIG_THERMAL
#include <linux/kconfig.h>

#if IS_ENABLED(CONFIG_THERMAL)
int mwl_thermal_register(struct mwl_priv *priv);
void mwl_thermal_unregister(struct mwl_priv *priv);
void mwl_thermal_set_throttling(struct mwl_priv *priv);
Expand Down

0 comments on commit ee0d12c

Please sign in to comment.