All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hmc5843: Trivial optimisation
@ 2011-01-19 10:04 shubhrajyoti
  2011-01-21 20:43 ` [PATCH] staging: iio: " Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: shubhrajyoti @ 2011-01-19 10:04 UTC (permalink / raw)
  To: linux-iio; +Cc: greg, Shubhrajyoti Datta

From: Shubhrajyoti Datta <shubhrajyoti@ti.com>

Free the memory that is used only at init

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Acked-by: "Jonathan Cameron <jic23@cam.ac.uk>"
---
 drivers/staging/iio/magnetometer/hmc5843.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 4f4c98a..a93c0fb 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -516,7 +516,7 @@ static int hmc5843_detect(struct i2c_client *client,
 }
 
 /* Called when we have found a new HMC5843. */
-static void hmc5843_init_client(struct i2c_client *client)
+static void __devinit hmc5843_init_client(struct i2c_client *client)
 {
 	struct hmc5843_data *data = i2c_get_clientdata(client);
 	hmc5843_set_meas_conf(client, data->meas_conf);
@@ -527,7 +527,7 @@ static void hmc5843_init_client(struct i2c_client *client)
 	pr_info("HMC5843 initialized\n");
 }
 
-static int hmc5843_probe(struct i2c_client *client,
+static int __devinit hmc5843_probe(struct i2c_client *client,
 			 const struct i2c_device_id *id)
 {
 	struct hmc5843_data *data;
@@ -572,7 +572,7 @@ exit:
 	return err;
 }
 
-static int hmc5843_remove(struct i2c_client *client)
+static int __devexit hmc5843_remove(struct i2c_client *client)
 {
 	struct hmc5843_data *data = i2c_get_clientdata(client);
 	 /*  sleep mode to save power */
@@ -614,7 +614,7 @@ static struct i2c_driver hmc5843_driver = {
 	},
 	.id_table	= hmc5843_id,
 	.probe		= hmc5843_probe,
-	.remove		= hmc5843_remove,
+	.remove		=  __devexit_p(hmc5843_remove),
 	.detect		= hmc5843_detect,
 	.address_list	= normal_i2c,
 };
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: iio: hmc5843: Trivial optimisation
  2011-01-19 10:04 [PATCH] hmc5843: Trivial optimisation shubhrajyoti
@ 2011-01-21 20:43 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2011-01-21 20:43 UTC (permalink / raw)
  To: shubhrajyoti; +Cc: linux-iio

On Wed, Jan 19, 2011 at 03:34:39PM +0530, shubhrajyoti@ti.com wrote:
> From: Shubhrajyoti Datta <shubhrajyoti@ti.com>
> 
> Free the memory that is used only at init

This patch no longer applies, care to refresh it and resend it?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-21 20:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19 10:04 [PATCH] hmc5843: Trivial optimisation shubhrajyoti
2011-01-21 20:43 ` [PATCH] staging: iio: " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.