]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drivers/misc/bmp085.c: free initmem memory
authorShubhrajyoti Datta <shubhrajyoti@ti.com>
Tue, 22 Mar 2011 23:33:57 +0000 (16:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Mar 2011 00:44:10 +0000 (17:44 -0700)
Free the memory that is used only at init

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/bmp085.c

index b6e1c9a6679edd11ae94738775b813ecf34632df..ecd276ad6b193452dec2e3ed993d04ca68ac2415 100644 (file)
@@ -402,7 +402,7 @@ exit:
        return status;
 }
 
-static int bmp085_probe(struct i2c_client *client,
+static int __devinit bmp085_probe(struct i2c_client *client,
                         const struct i2c_device_id *id)
 {
        struct bmp085_data *data;
@@ -438,7 +438,7 @@ exit:
        return err;
 }
 
-static int bmp085_remove(struct i2c_client *client)
+static int __devexit bmp085_remove(struct i2c_client *client)
 {
        sysfs_remove_group(&client->dev.kobj, &bmp085_attr_group);
        kfree(i2c_get_clientdata(client));
@@ -458,7 +458,7 @@ static struct i2c_driver bmp085_driver = {
        },
        .id_table       = bmp085_id,
        .probe          = bmp085_probe,
-       .remove         = bmp085_remove,
+       .remove         = __devexit_p(bmp085_remove),
 
        .detect         = bmp085_detect,
        .address_list   = normal_i2c