diff options
Diffstat (limited to 'drivers/w1/masters/ds2482.c')
-rw-r--r-- | drivers/w1/masters/ds2482.c | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index 2e30db1b1a43..d49681cd29af 100644 --- a/drivers/w1/masters/ds2482.c +++ b/drivers/w1/masters/ds2482.c @@ -20,8 +20,7 @@ #include <linux/delay.h> #include <asm/delay.h> -#include "../w1.h" -#include "../w1_int.h" +#include <linux/w1.h> /** * Allow the active pullup to be disabled, default is enabled. @@ -35,6 +34,8 @@ */ static int ds2482_active_pullup = 1; module_param_named(active_pullup, ds2482_active_pullup, int, 0644); +MODULE_PARM_DESC(active_pullup, "Active pullup (apply to all buses): " \ + "0-disable, 1-enable (default)"); /** * The DS2482 registers - there are 3 registers that are addressed by a read @@ -93,30 +94,6 @@ static const u8 ds2482_chan_rd[8] = #define DS2482_REG_STS_PPD 0x02 #define DS2482_REG_STS_1WB 0x01 - -static int ds2482_probe(struct i2c_client *client, - const struct i2c_device_id *id); -static int ds2482_remove(struct i2c_client *client); - - -/** - * Driver data (common to all clients) - */ -static const struct i2c_device_id ds2482_id[] = { - { "ds2482", 0 }, - { } -}; -MODULE_DEVICE_TABLE(i2c, ds2482_id); - -static struct i2c_driver ds2482_driver = { - .driver = { - .name = "ds2482", - }, - .probe = ds2482_probe, - .remove = ds2482_remove, - .id_table = ds2482_id, -}; - /* * Client data (each client gets its own) */ @@ -560,10 +537,25 @@ static int ds2482_remove(struct i2c_client *client) return 0; } +/** + * Driver data (common to all clients) + */ +static const struct i2c_device_id ds2482_id[] = { + { "ds2482", 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, ds2482_id); + +static struct i2c_driver ds2482_driver = { + .driver = { + .name = "ds2482", + }, + .probe = ds2482_probe, + .remove = ds2482_remove, + .id_table = ds2482_id, +}; module_i2c_driver(ds2482_driver); -MODULE_PARM_DESC(active_pullup, "Active pullup (apply to all buses): " \ - "0-disable, 1-enable (default)"); MODULE_AUTHOR("Ben Gardner <bgardner@wabtec.com>"); MODULE_DESCRIPTION("DS2482 driver"); MODULE_LICENSE("GPL"); |