]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/lm85.c
Merge rsync://bughost.org/repos/ieee80211-delta/
[linux-2.6-omap-h63xx.git] / drivers / hwmon / lm85.c
index ab214df9624bc423376bef632b4a87d0d1f2cf96..d1070ed2bee617d20ca9604442f3d61f0a225f2b 100644 (file)
@@ -1007,14 +1007,14 @@ temp_auto(1);
 temp_auto(2);
 temp_auto(3);
 
-int lm85_attach_adapter(struct i2c_adapter *adapter)
+static int lm85_attach_adapter(struct i2c_adapter *adapter)
 {
        if (!(adapter->class & I2C_CLASS_HWMON))
                return 0;
        return i2c_probe(adapter, &addr_data, lm85_detect);
 }
 
-int lm85_detect(struct i2c_adapter *adapter, int address,
+static int lm85_detect(struct i2c_adapter *adapter, int address,
                int kind)
 {
        int company, verstep ;
@@ -1033,11 +1033,10 @@ int lm85_detect(struct i2c_adapter *adapter, int address,
           client structure, even though we cannot fill it completely yet.
           But it allows us to access lm85_{read,write}_value. */
 
-       if (!(data = kmalloc(sizeof(struct lm85_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct lm85_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto ERROR0;
        }
-       memset(data, 0, sizeof(struct lm85_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);
@@ -1236,7 +1235,7 @@ int lm85_detect(struct i2c_adapter *adapter, int address,
        return err;
 }
 
-int lm85_detach_client(struct i2c_client *client)
+static int lm85_detach_client(struct i2c_client *client)
 {
        struct lm85_data *data = i2c_get_clientdata(client);
        hwmon_device_unregister(data->class_dev);
@@ -1246,7 +1245,7 @@ int lm85_detach_client(struct i2c_client *client)
 }
 
 
-int lm85_read_value(struct i2c_client *client, u8 reg)
+static int lm85_read_value(struct i2c_client *client, u8 reg)
 {
        int res;
 
@@ -1276,7 +1275,7 @@ int lm85_read_value(struct i2c_client *client, u8 reg)
        return res ;
 }
 
-int lm85_write_value(struct i2c_client *client, u8 reg, int value)
+static int lm85_write_value(struct i2c_client *client, u8 reg, int value)
 {
        int res ;
 
@@ -1305,7 +1304,7 @@ int lm85_write_value(struct i2c_client *client, u8 reg, int value)
        return res ;
 }
 
-void lm85_init_client(struct i2c_client *client)
+static void lm85_init_client(struct i2c_client *client)
 {
        int value;
        struct lm85_data *data = i2c_get_clientdata(client);