diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-11-16 09:13:38 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-17 20:15:39 (GMT) |
commit | 6e5af184f810f6150e07339bd23a09c498739c82 (patch) | |
tree | 0e0cbc3375b725df5a432f42e9bdca94402dc5d5 /drivers/staging/iio/addac | |
parent | 3acbb0142d48713a8f65cde678a54f419801c189 (diff) | |
download | linux-fsl-qoriq-6e5af184f810f6150e07339bd23a09c498739c82.tar.xz |
staging:iio: Use module_i2c_driver to register I2C drivers
Use the newly introduced module_i2c_driver macro for registering I2C drivers.
This allows us to remove a few lines of boilerplate code.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/addac')
-rw-r--r-- | drivers/staging/iio/addac/adt7316-i2c.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/staging/iio/addac/adt7316-i2c.c b/drivers/staging/iio/addac/adt7316-i2c.c index 07d718e..2c03a39 100644 --- a/drivers/staging/iio/addac/adt7316-i2c.c +++ b/drivers/staging/iio/addac/adt7316-i2c.c @@ -151,21 +151,9 @@ static struct i2c_driver adt7316_driver = { .resume = adt7316_i2c_resume, .id_table = adt7316_i2c_id, }; - -static __init int adt7316_i2c_init(void) -{ - return i2c_add_driver(&adt7316_driver); -} - -static __exit void adt7316_i2c_exit(void) -{ - i2c_del_driver(&adt7316_driver); -} +module_i2c_driver(adt7316_driver); MODULE_AUTHOR("Sonic Zhang <sonic.zhang@analog.com>"); MODULE_DESCRIPTION("I2C bus driver for Analog Devices ADT7316/7/9 and" "ADT7516/7/8 digital temperature sensor, ADC and DAC"); MODULE_LICENSE("GPL v2"); - -module_init(adt7316_i2c_init); -module_exit(adt7316_i2c_exit); |