From 4c0d39fc592857a076f48fbf9552ced2ed702ffe Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Tue, 15 May 2007 10:26:16 +0000 Subject: [PATCH] Simplify spd_read_byte() functions (trivial). Signed-off-by: Uwe Hermann Acked-by: Uwe Hermann git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2670 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/asus/p2b/auto.c | 5 +---- src/mainboard/bitworks/ims/auto.c | 5 +---- src/mainboard/densitron/dpx114/auto.c | 4 +--- src/mainboard/via/epia-m/auto.c | 4 +--- src/mainboard/via/epia/auto.c | 4 +--- 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/mainboard/asus/p2b/auto.c b/src/mainboard/asus/p2b/auto.c index f5c6a2f1d7..e874a95f12 100644 --- a/src/mainboard/asus/p2b/auto.c +++ b/src/mainboard/asus/p2b/auto.c @@ -57,12 +57,9 @@ static void enable_shadow_ram(void) pci_write_config8(0, 0x59, shadowreg); } -/* TODO: fix raminit.c to use smbus_read_byte */ static inline int spd_read_byte(unsigned device, unsigned address) { - uint8_t c; - c = smbus_read_byte(device, address); - return c; + return smbus_read_byte(device, address); } #include "northbridge/intel/i440bx/raminit.c" diff --git a/src/mainboard/bitworks/ims/auto.c b/src/mainboard/bitworks/ims/auto.c index 9713a1ca7c..bfd10afec2 100644 --- a/src/mainboard/bitworks/ims/auto.c +++ b/src/mainboard/bitworks/ims/auto.c @@ -37,12 +37,9 @@ static void enable_shadow_ram(void) pci_write_config8(0, 0x59, shadowreg); } -/* TODO: fix raminit.c to use smbus_read_byte */ static inline int spd_read_byte(unsigned device, unsigned address) { - uint8_t c; - c = smbus_read_byte(device, address); - return c; + return smbus_read_byte(device, address); } #include "northbridge/intel/i440bx/raminit.c" diff --git a/src/mainboard/densitron/dpx114/auto.c b/src/mainboard/densitron/dpx114/auto.c index a1b3818b93..992dfbcf22 100644 --- a/src/mainboard/densitron/dpx114/auto.c +++ b/src/mainboard/densitron/dpx114/auto.c @@ -35,9 +35,7 @@ void udelay(int usecs) #include "southbridge/via/vt8231/vt8231_early_serial.c" static inline int spd_read_byte(unsigned device, unsigned address) { - unsigned char c; - c = smbus_read_byte(device, address); - return c; + return smbus_read_byte(device, address); } #include "northbridge/via/vt8601/raminit.c" diff --git a/src/mainboard/via/epia-m/auto.c b/src/mainboard/via/epia-m/auto.c index e7b310ffcb..c82be2e111 100644 --- a/src/mainboard/via/epia-m/auto.c +++ b/src/mainboard/via/epia-m/auto.c @@ -39,9 +39,7 @@ static void memreset_setup(void) static inline int spd_read_byte(unsigned device, unsigned address) { - unsigned char c; - c = smbus_read_byte(device, address); - return c; + return smbus_read_byte(device, address); } #include "northbridge/via/vt8623/raminit.c" diff --git a/src/mainboard/via/epia/auto.c b/src/mainboard/via/epia/auto.c index dcaa6aace9..aec0dbff14 100644 --- a/src/mainboard/via/epia/auto.c +++ b/src/mainboard/via/epia/auto.c @@ -31,9 +31,7 @@ void udelay(int usecs) static inline int spd_read_byte(unsigned device, unsigned address) { - unsigned char c; - c = smbus_read_byte(device, address); - return c; + return smbus_read_byte(device, address); } #include "northbridge/via/vt8601/raminit.c"