lkml.org 
[lkml]   [2012]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRE: [PATCH] power_supply: Add MODULE_DEVICE_TABLE for lp8727 charger
> Add MODULE_DEVICE_TABLE to 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:axel.lin@gmail.com]
Sent: Thursday, January 12, 2012 9:45 PM
To: linux-kernel@vger.kernel.org
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.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/power/lp8727_charger.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/power/lp8727_charger.c b/drivers/power/lp8727_charger.c
index b15b575..8e901c9 100644
--- a/drivers/power/lp8727_charger.c
+++ b/drivers/power/lp8727_charger.c
@@ -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 = {
--
1.7.5.4


\
 
 \ /
  Last update: 2012-01-16 06:11    [W:0.081 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site