Skip to contentSkip to conversation

power_supply: ds2780_battery/z2_battery: add __devexit_p at necessary places

PATCH Applied Axel Lin 3 participants 3 messages Jul 7, 2011 – Aug 24, 2011

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 power_supply: ds2780_battery/z2_battery: add __devexit_p at necessary places

According to the comments in include/linux/init.h:

"Pointers to __devexit functions must use __devexit_p(function_name), the wrapper will insert either the function_name or NULL, depending on the config options."

Cc Clifton Barnes <[email protected]>
Cc Peter Edwards <[email protected]>
---
 drivers/power/ds2780_battery.c |    2 +-
 drivers/power/z2_battery.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/power/ds2780_battery.c +1 -1
index 1fefe82..ed25ef5 100644
@@ -832,7 +832,7 @@ static struct platform_driver ds2780_battery_driver = {
 		.name = "ds2780-battery",
 	},
 	.probe	  = ds2780_battery_probe,
-	.remove   = ds2780_battery_remove,
+	.remove   = __devexit_p(ds2780_battery_remove),
 };
 
 static int __init ds2780_battery_init(void)
drivers/power/z2_battery.c +1 -1
index d119c38..ae38c44 100644
@@ -313,7 +313,7 @@ static struct i2c_driver z2_batt_driver = {
 		.pm	= Z2_BATTERY_PM_OPS
 	},
 	.probe		= z2_batt_probe,
-	.remove		= z2_batt_remove,
+	.remove		= __devexit_p(z2_batt_remove),
 	.id_table	= z2_batt_id,
 };
 
Signature · 1 line
1.7.4.1
Acked-by on v1 1/1
#2 lore raw
In reply to Axel Lin
Quoted 7 lines · Axel Lin

According to the comments in include/linux/init.h:

"Pointers to __devexit functions must use __devexit_p(function_name), the wrapper will insert either the function_name or NULL, depending on the config options."

Checked out ok here for ds2780.

���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�