power_supply: Add MODULE_DEVICE_TABLE for lp8727 charger
PATCH 1/1 power_supply: Add MODULE_DEVICE_TABLE for lp8727 charger
Add MODULE_DEVICE_TABLE to setup modalias for lp8727. The i2c_device_id table is supposed to be zero-terminated. Thus add a missing terminate entry for lp8727_ids.
--- drivers/power/lp8727_charger.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/power/lp8727_charger.c +2 -0
@@ -464,7 +464,9 @@ static int __devexit lp8727_remove(struct i2c_client *cl)static const struct i2c_device_id lp8727_ids[] = { {"lp8727" ,0 }, + { }, }; +MODULE_DEVICE_TABLE (i2c, lp8727_ids);static struct i2c_driver lp8727_driver = { .driver = {
Signature · 1 line
1.7.5.4
Quoted 1 line
Add
MODULE_DEVICE_TABLEto setup modalias for lp8727.
Autoloading this module is not required.
The LP8727 includes a charger function with the micro/mini USB interface.
Charging a battery and detecting which cable is inserted, this kind of job must be started at the beginning of system boot. So the lp8727 driver should be loaded before an user-space accesses this driver.
Thanks & BR
Milo -
-----Original Message-----
From: Axel Lin [mailto:[email protected]]
Sent: Thursday, January 12, 2012 9:45 PM
To: [email protected]
Cc: Kim, Milo; Jeong, Daniel; Anton Vorontsov
Subject: [PATCH] power_supply: Add MODULE_DEVICE_TABLE for lp8727 charger
Add MODULE_DEVICE_TABLE to setup modalias for lp8727. The i2c_device_id table is supposed to be zero-terminated. Thus add a missing terminate entry for lp8727_ids.
--- drivers/power/lp8727_charger.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/power/lp8727_charger.c +2 -0
@@ -464,7 +464,9 @@ static int __devexit lp8727_remove(struct i2c_client *cl)static const struct i2c_device_id lp8727_ids[] = { {"lp8727" ,0 }, + { }, }; +MODULE_DEVICE_TABLE (i2c, lp8727_ids);static struct i2c_driver lp8727_driver = { .driver = {
Signature · 5 lines
1.7.5.4
���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�2012/1/16 Kim, Milo <[email protected]>:
Quoted 3 lines
Quoted 1 line
Add
MODULE_DEVICE_TABLEto setup modalias for lp8727.Autoloading this module is not required.
Well, Then I'll send a patch to just add terminating entry for i2c_device_id table.
Quoted 3 lines
The LP8727 includes a charger function with the micro/mini USB interface.
Charging a battery and detecting which cable is inserted, this kind of job must be started at the beginning of system boot. So the lp8727 driver should be loaded before an user-space accesses this driver.
If this driver can be built as a module, people may load/unload the module anytime ( and I think this is nothing to do with autoloading).
Regards,
Axel
Anton Vorontsov
AppliedQuoted 14 lines · Axel Lin
Add
MODULE_DEVICE_TABLEto setup modalias for lp8727. Thei2c_device_idtable is supposed to be zero-terminated. Thus add a missing terminate entry forlp8727_ids.Signed-off-by Axel Lin <[email protected]>--- drivers/power/lp8727_charger.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/power/lp8727_charger.c +0
-0
drivers/power/lp8727_charger.c static int __devexit lp8727_remove(struct i2c_client *cl) · line 469
Quoted 6 lines
drivers/power/lp8727_charger.c +2
-0@@ -464,7 +464,9 @@ static int __devexit lp8727_remove(struct i2c_client *cl)static const struct i2c_device_id lp8727_ids[] = { {"lp8727" ,0 }, + { }, }; +MODULE_DEVICE_TABLE (i2c, lp8727_ids);
Applied, thank you!
Signature · 2 lines
Anton Vorontsov Email: [email protected]