aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2009-01-08 20:13:16 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2009-01-08 20:13:16 +0000
commite09ceee32e6c8b223f13659741145ccf2b9b49cd (patch)
tree3f6d3870687244f94f5ca42049c56d70a710aec4 /drivers/i2c
parenta13f98c506ad4670727550ed076bac616192f3ae (diff)
clean-lp5521-warnings.patch
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/chips/lp5521.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/i2c/chips/lp5521.c b/drivers/i2c/chips/lp5521.c
index cc407b7fbff..33dca6632ce 100644
--- a/drivers/i2c/chips/lp5521.c
+++ b/drivers/i2c/chips/lp5521.c
@@ -459,6 +459,7 @@ fail1:
return ret;
}
+#ifdef MODULE
static void lp5521_unregister_sysfs(struct i2c_client *client)
{
struct lp5521_chip *chip = i2c_get_clientdata(client);
@@ -472,6 +473,7 @@ static void lp5521_unregister_sysfs(struct i2c_client *client)
if (!strcmp(chip->mode, LP5521_MODE_LOAD))
device_remove_file(dev, &dev_attr_load);
}
+#endif
/*--------------------------------------------------------------*/
/* Set chip operating mode */
@@ -525,7 +527,7 @@ static int lp5521_resume(struct device *dev)
#define lp5521_resume NULL
#endif
-static int lp5521_probe(struct i2c_client *client)
+static int lp5521_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
struct lp5521_chip *chip;
int ret = 0;
@@ -535,7 +537,7 @@ static int lp5521_probe(struct i2c_client *client)
if (!chip)
return -ENOMEM;
- chip->client = client;
+ chip->client = client;
strncpy(client->name, LP5521_DRIVER_NAME, I2C_NAME_SIZE);
i2c_set_clientdata(client, chip);
@@ -567,10 +569,7 @@ fail1:
return ret;
}
-static struct i2c_device_id lp5521_id_table[] = {
- {LP5521_DRIVER_NAME, },
-};
-
+#ifdef MODULE
static int lp5521_remove(struct i2c_client *client)
{
struct lp5521_chip *chip = i2c_get_clientdata(client);
@@ -580,6 +579,7 @@ static int lp5521_remove(struct i2c_client *client)
return 0;
}
+#endif
static struct i2c_driver lp5521_driver = {
.driver = {