aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-09-27 16:41:26 -0400
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-08-16 01:46:41 -0400
commit6b583a64fd1e019fd01626b46892ebf2361951c5 (patch)
treeaefcf8e4d237b153f6bb1594dcf5773fc354be49
parent26dcc12c009e3222f8b975f23c605516a5d3b29f (diff)
rtc: ds1307: simplify hwmon config
We don't have to define an extra config symbol, IS_REACHABLE does what we need. And having this config symbol just to save the few bytes of hwmon support on non-DS3231 chips isn't worth it IMO (especially as the symbol is set per default). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--drivers/rtc/Kconfig9
-rw-r--r--drivers/rtc/rtc-ds1307.c2
2 files changed, 1 insertions, 10 deletions
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 2962fa09baf1..7d7be60a2413 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -244,15 +244,6 @@ config RTC_DRV_DS1307
244 This driver can also be built as a module. If so, the module 244 This driver can also be built as a module. If so, the module
245 will be called rtc-ds1307. 245 will be called rtc-ds1307.
246 246
247config RTC_DRV_DS1307_HWMON
248 bool "HWMON support for rtc-ds1307"
249 depends on RTC_DRV_DS1307 && HWMON
250 depends on !(RTC_DRV_DS1307=y && HWMON=m)
251 default y
252 help
253 Say Y here if you want to expose temperature sensor data on
254 rtc-ds1307 (only DS3231)
255
256config RTC_DRV_DS1307_CENTURY 247config RTC_DRV_DS1307_CENTURY
257 bool "Century bit support for rtc-ds1307" 248 bool "Century bit support for rtc-ds1307"
258 depends on RTC_DRV_DS1307 249 depends on RTC_DRV_DS1307
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 0162a600ff1b..4b2b4627daeb 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1042,7 +1042,7 @@ static u8 ds1307_trickle_init(struct ds1307 *ds1307,
1042 1042
1043/*----------------------------------------------------------------------*/ 1043/*----------------------------------------------------------------------*/
1044 1044
1045#ifdef CONFIG_RTC_DRV_DS1307_HWMON 1045#if IS_REACHABLE(CONFIG_HWMON)
1046 1046
1047/* 1047/*
1048 * Temperature sensor support for ds3231 devices. 1048 * Temperature sensor support for ds3231 devices.