Commit 45bff2ea authored by Shubhrajyoti Datta's avatar Shubhrajyoti Datta Committed by Linus Torvalds

drivers/misc/bmp085.c: free initmem memory

Free the memory that is used only at init
Signed-off-by: default avatarShubhrajyoti Datta <shubhrajyoti@ti.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4a7de634
...@@ -402,7 +402,7 @@ static int bmp085_init_client(struct i2c_client *client) ...@@ -402,7 +402,7 @@ static int bmp085_init_client(struct i2c_client *client)
return status; 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) const struct i2c_device_id *id)
{ {
struct bmp085_data *data; struct bmp085_data *data;
...@@ -438,7 +438,7 @@ static int bmp085_probe(struct i2c_client *client, ...@@ -438,7 +438,7 @@ static int bmp085_probe(struct i2c_client *client,
return err; 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); sysfs_remove_group(&client->dev.kobj, &bmp085_attr_group);
kfree(i2c_get_clientdata(client)); kfree(i2c_get_clientdata(client));
...@@ -458,7 +458,7 @@ static struct i2c_driver bmp085_driver = { ...@@ -458,7 +458,7 @@ static struct i2c_driver bmp085_driver = {
}, },
.id_table = bmp085_id, .id_table = bmp085_id,
.probe = bmp085_probe, .probe = bmp085_probe,
.remove = bmp085_remove, .remove = __devexit_p(bmp085_remove),
.detect = bmp085_detect, .detect = bmp085_detect,
.address_list = normal_i2c .address_list = normal_i2c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment