diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-03-01 18:37:57 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-30 03:41:25 -0400 |
commit | 1e6b5033501291bea037d98bea19f0eb03f2adef (patch) | |
tree | c0637dce91fd1d916036cfec7f271697009ed791 | |
parent | 9808ff151781efa43a6436945bac7629c3f4125b (diff) |
iio: magnetometer: ak8974: remove incorrect __exit markups
commit 3ff861f59f6c1f5bf2bc03d2cd36ac3f992cbc06 upstream.
Even if bus is not hot-pluggable, devices can be unbound from the
driver via sysfs, so we should not be using __exit annotations on
remove() methods. The only exception is drivers registered with
platform_driver_probe() which specifically disables sysfs bind/unbind
attributes.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/iio/magnetometer/ak8974.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/magnetometer/ak8974.c b/drivers/iio/magnetometer/ak8974.c index 217353145676..dd3fcd1704f8 100644 --- a/drivers/iio/magnetometer/ak8974.c +++ b/drivers/iio/magnetometer/ak8974.c | |||
@@ -767,7 +767,7 @@ power_off: | |||
767 | return ret; | 767 | return ret; |
768 | } | 768 | } |
769 | 769 | ||
770 | static int __exit ak8974_remove(struct i2c_client *i2c) | 770 | static int ak8974_remove(struct i2c_client *i2c) |
771 | { | 771 | { |
772 | struct iio_dev *indio_dev = i2c_get_clientdata(i2c); | 772 | struct iio_dev *indio_dev = i2c_get_clientdata(i2c); |
773 | struct ak8974 *ak8974 = iio_priv(indio_dev); | 773 | struct ak8974 *ak8974 = iio_priv(indio_dev); |
@@ -849,7 +849,7 @@ static struct i2c_driver ak8974_driver = { | |||
849 | .of_match_table = of_match_ptr(ak8974_of_match), | 849 | .of_match_table = of_match_ptr(ak8974_of_match), |
850 | }, | 850 | }, |
851 | .probe = ak8974_probe, | 851 | .probe = ak8974_probe, |
852 | .remove = __exit_p(ak8974_remove), | 852 | .remove = ak8974_remove, |
853 | .id_table = ak8974_id, | 853 | .id_table = ak8974_id, |
854 | }; | 854 | }; |
855 | module_i2c_driver(ak8974_driver); | 855 | module_i2c_driver(ak8974_driver); |