diff options
Diffstat (limited to 'drivers/i2c/chips/ds1337.c')
-rw-r--r-- | drivers/i2c/chips/ds1337.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/i2c/chips/ds1337.c b/drivers/i2c/chips/ds1337.c index 82cf959989fd..9d3175c03395 100644 --- a/drivers/i2c/chips/ds1337.c +++ b/drivers/i2c/chips/ds1337.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/i2c-sensor.h> | ||
21 | #include <linux/string.h> | 20 | #include <linux/string.h> |
22 | #include <linux/rtc.h> /* get the user-level API */ | 21 | #include <linux/rtc.h> /* get the user-level API */ |
23 | #include <linux/bcd.h> | 22 | #include <linux/bcd.h> |
@@ -39,9 +38,8 @@ | |||
39 | * Functions declaration | 38 | * Functions declaration |
40 | */ | 39 | */ |
41 | static unsigned short normal_i2c[] = { 0x68, I2C_CLIENT_END }; | 40 | static unsigned short normal_i2c[] = { 0x68, I2C_CLIENT_END }; |
42 | static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; | ||
43 | 41 | ||
44 | SENSORS_INSMOD_1(ds1337); | 42 | I2C_CLIENT_INSMOD_1(ds1337); |
45 | 43 | ||
46 | static int ds1337_attach_adapter(struct i2c_adapter *adapter); | 44 | static int ds1337_attach_adapter(struct i2c_adapter *adapter); |
47 | static int ds1337_detect(struct i2c_adapter *adapter, int address, int kind); | 45 | static int ds1337_detect(struct i2c_adapter *adapter, int address, int kind); |
@@ -227,7 +225,7 @@ int ds1337_do_command(int bus, int cmd, void *arg) | |||
227 | 225 | ||
228 | static int ds1337_attach_adapter(struct i2c_adapter *adapter) | 226 | static int ds1337_attach_adapter(struct i2c_adapter *adapter) |
229 | { | 227 | { |
230 | return i2c_detect(adapter, &addr_data, ds1337_detect); | 228 | return i2c_probe(adapter, &addr_data, ds1337_detect); |
231 | } | 229 | } |
232 | 230 | ||
233 | /* | 231 | /* |
@@ -354,11 +352,8 @@ static int ds1337_detach_client(struct i2c_client *client) | |||
354 | int err; | 352 | int err; |
355 | struct ds1337_data *data = i2c_get_clientdata(client); | 353 | struct ds1337_data *data = i2c_get_clientdata(client); |
356 | 354 | ||
357 | if ((err = i2c_detach_client(client))) { | 355 | if ((err = i2c_detach_client(client))) |
358 | dev_err(&client->dev, "Client deregistration failed, " | ||
359 | "client not detached.\n"); | ||
360 | return err; | 356 | return err; |
361 | } | ||
362 | 357 | ||
363 | list_del(&data->list); | 358 | list_del(&data->list); |
364 | kfree(data); | 359 | kfree(data); |