adm1026: removed prototype
authorVikram Narayanan <vikram186@gmail.com>
Sat, 21 Jan 2012 10:02:59 +0000 (15:32 +0530)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Sat, 21 Jan 2012 17:48:03 +0000 (18:48 +0100)
Removed the prototype and restructured the code

Change-Id: I13a648acf7bae30635e0469e301ce5635d9d7a8c
Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Reviewed-on: http://review.coreboot.org/570
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
src/drivers/i2c/adm1026/adm1026.c

index 1aaae52e6d265e00ad6badb9b5567d3780c1214b..5b06629088eaef3752b61ab742350219aeb2246f 100644 (file)
 #define ADM1026_REG_CONFIG2 0x01
 #define ADM1026_REG_CONFIG3 0x07
 
-static void adm1026_enable_monitoring(device_t dev);
-
-static void adm1026_init(device_t dev)
-{
-       if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
-               if (ops_smbus_bus(get_pbus_smbus(dev))) {
-                       if (dev->bus->dev->path.type == DEVICE_PATH_I2C)
-                               smbus_set_link(dev);    // it is under mux
-                       adm1026_enable_monitoring(dev);
-               }
-       }
-}
-
 static void adm1026_enable_monitoring(device_t dev)
 {
        int result;
@@ -47,6 +34,17 @@ static void adm1026_enable_monitoring(device_t dev)
        }
 }
 
+static void adm1026_init(device_t dev)
+{
+       if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
+               if (ops_smbus_bus(get_pbus_smbus(dev))) {
+                       if (dev->bus->dev->path.type == DEVICE_PATH_I2C)
+                               smbus_set_link(dev);    // it is under mux
+                       adm1026_enable_monitoring(dev);
+               }
+       }
+}
+
 static void adm1026_noop(device_t dummy)
 {
 }