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/impedance-analyzer | |
parent | 3acbb0142d48713a8f65cde678a54f419801c189 (diff) | |
download | linux-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/impedance-analyzer')
-rw-r--r-- | drivers/staging/iio/impedance-analyzer/ad5933.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c index 1086e0b..454d131 100644 --- a/drivers/staging/iio/impedance-analyzer/ad5933.c +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c @@ -796,18 +796,7 @@ static struct i2c_driver ad5933_driver = { .remove = __devexit_p(ad5933_remove), .id_table = ad5933_id, }; - -static __init int ad5933_init(void) -{ - return i2c_add_driver(&ad5933_driver); -} -module_init(ad5933_init); - -static __exit void ad5933_exit(void) -{ - i2c_del_driver(&ad5933_driver); -} -module_exit(ad5933_exit); +module_i2c_driver(ad5933_driver); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_DESCRIPTION("Analog Devices AD5933 Impedance Conv. Network Analyzer"); |