public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Larry Johnson <lrj@arlinx.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Subject: [PATCH] Remove superfluous preprocessor conditionals from LM73 driver
Date: Sat, 29 Dec 2007 14:10:50 -0500	[thread overview]
Message-ID: <47769BBA.4040801@arlinx.com> (raw)

(1) Remove unused symbol "CFG_EEPROM_PAGE_WRITE_ENABLE".

(2) Use conditional Makefile.o.

Signed-off-by: Larry Johnson <lrj@acm.org>
---
(Patch applies to PPC4xx "master" branch.)

 drivers/hwmon/Makefile  |    2 +-
 drivers/hwmon/lm73.c    |    9 ---------
 include/configs/korat.h |    1 -
 3 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
index 32e3f44..065433a 100644
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
@@ -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
 
diff --git a/drivers/hwmon/lm73.c b/drivers/hwmon/lm73.c
index f9ae012..db8ef66 100644
--- a/drivers/hwmon/lm73.c
+++ b/drivers/hwmon/lm73.c
@@ -31,13 +31,6 @@
  */
 
 #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 */
diff --git a/include/configs/korat.h b/include/configs/korat.h
index 312b8c5..a0ea0f3 100644
--- a/include/configs/korat.h
+++ b/include/configs/korat.h
@@ -156,7 +156,6 @@
 #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
 
-- 
1.5.2.5

                 reply	other threads:[~2007-12-29 19:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47769BBA.4040801@arlinx.com \
    --to=lrj@arlinx.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox