]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Remove superfluous preprocessor conditionals from LM73 driver
authorLarry Johnson <lrj@acm.org>
Wed, 9 Jan 2008 17:42:35 +0000 (12:42 -0500)
committerWolfgang Denk <wd@denx.de>
Fri, 11 Jan 2008 23:26:47 +0000 (00:26 +0100)
(1) Remove unused symbol "CFG_EEPROM_PAGE_WRITE_ENABLE".

(2) Use conditional Makefile.o.

Signed-off-by: Larry Johnson <lrj@acm.org>
drivers/hwmon/Makefile
drivers/hwmon/lm73.c
include/configs/korat.h

index 32e3f44a916801e923e71fffb24edf4704fe2fc1..065433a6088942d2ace9bf98f21fc12e945886c6 100644 (file)
@@ -34,7 +34,7 @@ COBJS-y += adm1021.o
 COBJS-y += ds1621.o
 COBJS-y += ds1722.o
 COBJS-y += ds1775.o
-COBJS-y += lm73.o
+COBJS-$(CONFIG_DTT_LM73) += lm73.o
 COBJS-y += lm75.o
 COBJS-y += lm81.o
 
index f9ae01297bcdfd66813054977bb480aca0a4e3a5..db8ef662adc27194bf6cf96c212fbcbb3f48d247 100644 (file)
  */
 
 #include <common.h>
-
-#ifdef CONFIG_DTT_LM73
-#if !defined(CFG_EEPROM_PAGE_WRITE_ENABLE) || \
-       (CFG_EEPROM_PAGE_WRITE_BITS < 1)
-# error "CFG_EEPROM_PAGE_WRITE_ENABLE must be defined and CFG_EEPROM_PAGE_WRITE_BITS must be greater than  1 to use CONFIG_DTT_LM73"
-#endif
-
 #include <i2c.h>
 #include <dtt.h>
 
@@ -177,5 +170,3 @@ int dtt_get_temp(int sensor)
 {
        return (dtt_read(sensor, DTT_READ_TEMP) + 0x0040) >> 7;
 } /* dtt_get_temp() */
-
-#endif /* CONFIG_DTT_LM73 */
index 7d0640bbcf82645102bdbee9f71a4c3e673fa80d..5182972829be0a2363322c0f5b7f4233d9382426 100644 (file)
 #define CFG_I2C_MULTI_EEPROMS
 #define CFG_I2C_EEPROM_ADDR    (0xa8>>1)
 #define CFG_I2C_EEPROM_ADDR_LEN 1
-#define CFG_EEPROM_PAGE_WRITE_ENABLE
 #define CFG_EEPROM_PAGE_WRITE_BITS 3
 #define CFG_EEPROM_PAGE_WRITE_DELAY_MS 10