* [PATCH 1/4] mfd: Remove obsolete cleanup for clientdata
@ 2011-01-24 10:44 Wolfram Sang
2011-01-24 10:44 ` [PATCH 2/4] power: " Wolfram Sang
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Wolfram Sang @ 2011-01-24 10:44 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: Wolfram Sang, Samuel Ortiz, linux-kernel-u79uwXL29TY76Z2rM5mHXA
A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit or error. This is obsolete meanwhile, the core will do it.
Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
drivers/mfd/wl1273-core.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/wl1273-core.c b/drivers/mfd/wl1273-core.c
index d2ecc24..6bb5136 100644
--- a/drivers/mfd/wl1273-core.c
+++ b/drivers/mfd/wl1273-core.c
@@ -38,7 +38,6 @@ static int wl1273_core_remove(struct i2c_client *client)
dev_dbg(&client->dev, "%s\n", __func__);
mfd_remove_devices(&client->dev);
- i2c_set_clientdata(client, NULL);
kfree(core);
return 0;
@@ -104,7 +103,6 @@ static int __devinit wl1273_core_probe(struct i2c_client *client,
return 0;
err:
- i2c_set_clientdata(client, NULL);
pdata->free_resources();
kfree(core);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/4] power: Remove obsolete cleanup for clientdata
2011-01-24 10:44 [PATCH 1/4] mfd: Remove obsolete cleanup for clientdata Wolfram Sang
@ 2011-01-24 10:44 ` Wolfram Sang
2011-01-24 10:44 ` [PATCH 4/4] drivers/staging/lirc: " Wolfram Sang
[not found] ` <1295865880-27672-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2011-01-24 10:44 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, MyungJoo Ham, Anton Vorontsov, Kyungmin Park,
linux-kernel
A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit or error. This is obsolete meanwhile, the core will do it.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Anton Vorontsov <cbouatmailru@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/power/max17042_battery.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index c5c8805..09f7496 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -183,7 +183,6 @@ static int __devinit max17042_probe(struct i2c_client *client,
ret = power_supply_register(&client->dev, &chip->battery);
if (ret) {
dev_err(&client->dev, "failed: power supply register\n");
- i2c_set_clientdata(client, NULL);
kfree(chip);
return ret;
}
@@ -202,7 +201,6 @@ static int __devexit max17042_remove(struct i2c_client *client)
struct max17042_chip *chip = i2c_get_clientdata(client);
power_supply_unregister(&chip->battery);
- i2c_set_clientdata(client, NULL);
kfree(chip);
return 0;
}
--
1.7.2.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 4/4] drivers/staging/lirc: Remove obsolete cleanup for clientdata
2011-01-24 10:44 [PATCH 1/4] mfd: Remove obsolete cleanup for clientdata Wolfram Sang
2011-01-24 10:44 ` [PATCH 2/4] power: " Wolfram Sang
@ 2011-01-24 10:44 ` Wolfram Sang
[not found] ` <1295865880-27672-4-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
[not found] ` <1295865880-27672-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2 siblings, 1 reply; 9+ messages in thread
From: Wolfram Sang @ 2011-01-24 10:44 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Greg Kroah-Hartman, Mauro Carvalho Chehab,
Andy Walls, Jarod Wilson, Joe Perches, devel, linux-kernel
A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit or error. This is obsolete meanwhile, the core will do it. Simplify the
kfree() calls after that, the pointers don't need to be checked.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: Joe Perches <joe@perches.com>
---
Compile tested only.
drivers/staging/lirc/lirc_zilog.c | 28 +++++++++-------------------
1 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c
index 3fe5f41..df1055f 100644
--- a/drivers/staging/lirc/lirc_zilog.c
+++ b/drivers/staging/lirc/lirc_zilog.c
@@ -1214,15 +1214,12 @@ static int ir_remove(struct i2c_client *client)
/* Good-bye Rx */
destroy_rx_kthread(ir->rx);
- if (ir->rx != NULL) {
- if (ir->rx->buf.fifo_initialized)
- lirc_buffer_free(&ir->rx->buf);
- i2c_set_clientdata(ir->rx->c, NULL);
- kfree(ir->rx);
- }
+ if (ir->rx && ir->rx->buf.fifo_initialized)
+ lirc_buffer_free(&ir->rx->buf);
+
+ kfree(ir->rx);
/* Good-bye Tx */
- i2c_set_clientdata(ir->tx->c, NULL);
kfree(ir->tx);
/* Good-bye IR */
@@ -1388,18 +1385,11 @@ out_unregister:
out_free_thread:
destroy_rx_kthread(ir->rx);
out_free_xx:
- if (ir->rx != NULL) {
- if (ir->rx->buf.fifo_initialized)
- lirc_buffer_free(&ir->rx->buf);
- if (ir->rx->c != NULL)
- i2c_set_clientdata(ir->rx->c, NULL);
- kfree(ir->rx);
- }
- if (ir->tx != NULL) {
- if (ir->tx->c != NULL)
- i2c_set_clientdata(ir->tx->c, NULL);
- kfree(ir->tx);
- }
+ if (ir->rx && ir->rx->buf.fifo_initialized)
+ lirc_buffer_free(&ir->rx->buf);
+
+ kfree(ir->rx);
+ kfree(ir->tx);
out_free_ir:
del_ir_device(ir);
kfree(ir);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 9+ messages in thread[parent not found: <1295865880-27672-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* [PATCH 3/4] staging/ste_rmi4: Remove obsolete cleanup for clientdata
[not found] ` <1295865880-27672-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2011-01-24 10:44 ` Wolfram Sang
2011-01-31 10:45 ` [PATCH 1/4] mfd: " Samuel Ortiz
1 sibling, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2011-01-24 10:44 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: Wolfram Sang, Greg Kroah-Hartman, Naveen Kumar Gaddipati,
Linus Walleij, devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit or error. This is obsolete meanwhile, the core will do it.
Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
Cc: Naveen Kumar Gaddipati <naveen.gaddipati-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
Cc: Linus Walleij <linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
---
Compile tested only.
drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
index e8f047e..c9207de 100644
--- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
+++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
@@ -989,7 +989,7 @@ static int __devinit synaptics_rmi4_probe
retval = input_register_device(rmi4_data->input_dev);
if (retval) {
dev_err(&client->dev, "%s:input register failed\n", __func__);
- goto err_input_register;
+ goto err_query_dev;
}
/* Clear interrupts */
@@ -1011,8 +1011,6 @@ static int __devinit synaptics_rmi4_probe
err_request_irq:
free_irq(platformdata->irq_number, rmi4_data);
input_unregister_device(rmi4_data->input_dev);
-err_input_register:
- i2c_set_clientdata(client, NULL);
err_query_dev:
if (platformdata->regulator_en) {
regulator_disable(rmi4_data->regulator);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 1/4] mfd: Remove obsolete cleanup for clientdata
[not found] ` <1295865880-27672-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-01-24 10:44 ` [PATCH 3/4] staging/ste_rmi4: " Wolfram Sang
@ 2011-01-31 10:45 ` Samuel Ortiz
1 sibling, 0 replies; 9+ messages in thread
From: Samuel Ortiz @ 2011-01-31 10:45 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Hi _Wolfram_,
On Mon, Jan 24, 2011 at 11:44:27AM +0100, Wolfram Sang wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit or error. This is obsolete meanwhile, the core will do it.
Thanks a lot, patch applied now.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-01-31 10:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-24 10:44 [PATCH 1/4] mfd: Remove obsolete cleanup for clientdata Wolfram Sang
2011-01-24 10:44 ` [PATCH 2/4] power: " Wolfram Sang
2011-01-24 10:44 ` [PATCH 4/4] drivers/staging/lirc: " Wolfram Sang
[not found] ` <1295865880-27672-4-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-01-24 14:54 ` Jarod Wilson
2011-01-25 0:09 ` Andy Walls
2011-01-25 7:49 ` Jean Delvare
2011-01-25 20:57 ` Wolfram Sang
[not found] ` <1295865880-27672-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-01-24 10:44 ` [PATCH 3/4] staging/ste_rmi4: " Wolfram Sang
2011-01-31 10:45 ` [PATCH 1/4] mfd: " Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).