From 98b79003c21c2578206003256de4e781d6b36ca8 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Mon, 11 Jun 2007 19:02:53 -0500 Subject: [PATCH] rtc/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*). This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger --- rtc/bf5xx_rtc.c | 2 +- rtc/date.c | 2 +- rtc/ds12887.c | 2 +- rtc/ds1302.c | 2 +- rtc/ds1306.c | 2 +- rtc/ds1307.c | 2 +- rtc/ds1337.c | 2 +- rtc/ds1374.c | 2 +- rtc/ds1556.c | 2 +- rtc/ds164x.c | 2 +- rtc/ds174x.c | 2 +- rtc/ds3231.c | 2 +- rtc/m41t11.c | 2 +- rtc/m48t35ax.c | 2 +- rtc/max6900.c | 2 +- rtc/mc146818.c | 2 +- rtc/mk48t59.c | 2 +- rtc/mpc5xxx.c | 2 +- rtc/mpc8xx.c | 2 +- rtc/pcf8563.c | 2 +- rtc/rs5c372.c | 2 +- rtc/s3c24x0_rtc.c | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/rtc/bf5xx_rtc.c b/rtc/bf5xx_rtc.c index 85bbb56e39..b10be813cb 100644 --- a/rtc/bf5xx_rtc.c +++ b/rtc/bf5xx_rtc.c @@ -49,7 +49,7 @@ #include #include -#if defined(CONFIG_RTC_BFIN) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_BFIN) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) #include #include diff --git a/rtc/date.c b/rtc/date.c index b5f8c48eb3..17d870f90c 100644 --- a/rtc/date.c +++ b/rtc/date.c @@ -29,7 +29,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_TIMESTAMP) +#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE) || defined(CONFIG_TIMESTAMP) #define FEBRUARY 2 #define STARTOFTIME 1970 diff --git a/rtc/ds12887.c b/rtc/ds12887.c index 8b12893ce2..60382a15d1 100644 --- a/rtc/ds12887.c +++ b/rtc/ds12887.c @@ -28,7 +28,7 @@ #include #include -#if defined(CONFIG_RTC_DS12887) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS12887) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) #define RTC_SECONDS 0x00 #define RTC_SECONDS_ALARM 0x01 diff --git a/rtc/ds1302.c b/rtc/ds1302.c index 98dce899a9..908cc7c8fe 100644 --- a/rtc/ds1302.c +++ b/rtc/ds1302.c @@ -9,7 +9,7 @@ #include #include -#if defined(CONFIG_RTC_DS1302) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS1302) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) /* GPP Pins */ #define DATA 0x200 diff --git a/rtc/ds1306.c b/rtc/ds1306.c index e01e1ceae9..08622fb5c3 100644 --- a/rtc/ds1306.c +++ b/rtc/ds1306.c @@ -36,7 +36,7 @@ #include #include -#if defined(CONFIG_RTC_DS1306) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS1306) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) #define RTC_SECONDS 0x00 #define RTC_MINUTES 0x01 diff --git a/rtc/ds1307.c b/rtc/ds1307.c index 3b26a0a327..79201a184e 100644 --- a/rtc/ds1307.c +++ b/rtc/ds1307.c @@ -36,7 +36,7 @@ #include #if (defined(CONFIG_RTC_DS1307) || defined(CONFIG_RTC_DS1338) ) && \ - (CONFIG_COMMANDS & CFG_CMD_DATE) + ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) /*---------------------------------------------------------------------*/ #undef DEBUG_RTC diff --git a/rtc/ds1337.c b/rtc/ds1337.c index 9f0c8c01ef..4de4fa332c 100644 --- a/rtc/ds1337.c +++ b/rtc/ds1337.c @@ -32,7 +32,7 @@ #include #include -#if defined(CONFIG_RTC_DS1337) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS1337) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) /*---------------------------------------------------------------------*/ #undef DEBUG_RTC diff --git a/rtc/ds1374.c b/rtc/ds1374.c index 50a996c5cb..b0dd9dc32e 100644 --- a/rtc/ds1374.c +++ b/rtc/ds1374.c @@ -35,7 +35,7 @@ #include #include -#if (defined(CONFIG_RTC_DS1374)) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if (defined(CONFIG_RTC_DS1374)) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) /*---------------------------------------------------------------------*/ #undef DEBUG_RTC diff --git a/rtc/ds1556.c b/rtc/ds1556.c index dd9ea5ef80..8d4602a507 100644 --- a/rtc/ds1556.c +++ b/rtc/ds1556.c @@ -37,7 +37,7 @@ #include -#if defined(CONFIG_RTC_DS1556) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS1556) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) static uchar rtc_read( unsigned int addr ); static void rtc_write( unsigned int addr, uchar val); diff --git a/rtc/ds164x.c b/rtc/ds164x.c index 3cc76aba00..36a0fb44fd 100644 --- a/rtc/ds164x.c +++ b/rtc/ds164x.c @@ -37,7 +37,7 @@ #include -#if defined(CONFIG_RTC_DS164x) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS164x) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) static uchar rtc_read(unsigned int addr ); static void rtc_write(unsigned int addr, uchar val); diff --git a/rtc/ds174x.c b/rtc/ds174x.c index 58b13e9daa..5261e54c18 100644 --- a/rtc/ds174x.c +++ b/rtc/ds174x.c @@ -33,7 +33,7 @@ #include #include -#if defined(CONFIG_RTC_DS174x) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS174x) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) static uchar rtc_read( unsigned int addr ); static void rtc_write( unsigned int addr, uchar val); diff --git a/rtc/ds3231.c b/rtc/ds3231.c index 50aeeb5615..208f1522b9 100644 --- a/rtc/ds3231.c +++ b/rtc/ds3231.c @@ -33,7 +33,7 @@ #include #include -#if defined(CONFIG_RTC_DS3231) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_DS3231) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) /*---------------------------------------------------------------------*/ #undef DEBUG_RTC diff --git a/rtc/m41t11.c b/rtc/m41t11.c index c725cc9045..1f87aefeb5 100644 --- a/rtc/m41t11.c +++ b/rtc/m41t11.c @@ -43,7 +43,7 @@ #endif */ -#if defined(CONFIG_RTC_M41T11) && defined(CFG_I2C_RTC_ADDR) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_M41T11) && defined(CFG_I2C_RTC_ADDR) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) static unsigned bcd2bin (uchar n) { diff --git a/rtc/m48t35ax.c b/rtc/m48t35ax.c index 6c38a538b9..f22405ba8e 100644 --- a/rtc/m48t35ax.c +++ b/rtc/m48t35ax.c @@ -33,7 +33,7 @@ #include #include -#if defined(CONFIG_RTC_M48T35A) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_M48T35A) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) static uchar rtc_read (uchar reg); static void rtc_write (uchar reg, uchar val); diff --git a/rtc/max6900.c b/rtc/max6900.c index 73919cd98d..8bf23d5a88 100644 --- a/rtc/max6900.c +++ b/rtc/max6900.c @@ -32,7 +32,7 @@ #include #include -#if defined(CONFIG_RTC_MAX6900) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_MAX6900) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) #ifndef CFG_I2C_RTC_ADDR #define CFG_I2C_RTC_ADDR 0x50 diff --git a/rtc/mc146818.c b/rtc/mc146818.c index 20b1b3e770..3a29d06224 100644 --- a/rtc/mc146818.c +++ b/rtc/mc146818.c @@ -31,7 +31,7 @@ #include #include -#if defined(CONFIG_RTC_MC146818) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_MC146818) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) static uchar rtc_read (uchar reg); static void rtc_write (uchar reg, uchar val); diff --git a/rtc/mk48t59.c b/rtc/mk48t59.c index 64f751f75f..3987e2787e 100644 --- a/rtc/mk48t59.c +++ b/rtc/mk48t59.c @@ -131,7 +131,7 @@ void nvram_write(short dest, const void *src, size_t count) rtc_write(d++, *s++); } -#if (CONFIG_COMMANDS & CFG_CMD_DATE) +#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE) /* ------------------------------------------------------------------------- */ diff --git a/rtc/mpc5xxx.c b/rtc/mpc5xxx.c index 2053df153f..7195af0d07 100644 --- a/rtc/mpc5xxx.c +++ b/rtc/mpc5xxx.c @@ -32,7 +32,7 @@ #include #include -#if defined(CONFIG_RTC_MPC5200) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_MPC5200) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) /***************************************************************************** * this structure should be defined in mpc5200.h ... diff --git a/rtc/mpc8xx.c b/rtc/mpc8xx.c index 830e56e17c..33f867a6fa 100644 --- a/rtc/mpc8xx.c +++ b/rtc/mpc8xx.c @@ -31,7 +31,7 @@ #include #include -#if defined(CONFIG_RTC_MPC8xx) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_MPC8xx) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) /* ------------------------------------------------------------------------- */ diff --git a/rtc/pcf8563.c b/rtc/pcf8563.c index 05ae97eab8..1dacaa35ff 100644 --- a/rtc/pcf8563.c +++ b/rtc/pcf8563.c @@ -32,7 +32,7 @@ #include #include -#if defined(CONFIG_RTC_PCF8563) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_PCF8563) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) static uchar rtc_read (uchar reg); static void rtc_write (uchar reg, uchar val); diff --git a/rtc/rs5c372.c b/rtc/rs5c372.c index b56808b8ba..6e1171024c 100644 --- a/rtc/rs5c372.c +++ b/rtc/rs5c372.c @@ -34,7 +34,7 @@ #include #include -#if defined(CONFIG_RTC_RS5C372A) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_RS5C372A) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) /* * Reads are always done starting with register 15, which requires some * jumping-through-hoops to access the data correctly. diff --git a/rtc/s3c24x0_rtc.c b/rtc/s3c24x0_rtc.c index 9e2191e873..0b0b160e2a 100644 --- a/rtc/s3c24x0_rtc.c +++ b/rtc/s3c24x0_rtc.c @@ -28,7 +28,7 @@ #include #include -#if defined(CONFIG_RTC_S3C24X0) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_S3C24X0) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)) #if defined(CONFIG_S3C2400) #include -- 2.39.5