From: Dmitry Torokhov Date: Wed, 1 Mar 2017 23:37:57 +0000 (-0800) Subject: iio: magnetometer: ak8974: remove incorrect __exit markups X-Git-Tag: v4.9.19~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e6b5033501291bea037d98bea19f0eb03f2adef;p=platform%2Fkernel%2Flinux-amlogic.git 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 Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/iio/magnetometer/ak8974.c b/drivers/iio/magnetometer/ak8974.c index 2173531..dd3fcd1 100644 --- a/drivers/iio/magnetometer/ak8974.c +++ b/drivers/iio/magnetometer/ak8974.c @@ -767,7 +767,7 @@ power_off: return ret; } -static int __exit ak8974_remove(struct i2c_client *i2c) +static int ak8974_remove(struct i2c_client *i2c) { struct iio_dev *indio_dev = i2c_get_clientdata(i2c); struct ak8974 *ak8974 = iio_priv(indio_dev); @@ -849,7 +849,7 @@ static struct i2c_driver ak8974_driver = { .of_match_table = of_match_ptr(ak8974_of_match), }, .probe = ak8974_probe, - .remove = __exit_p(ak8974_remove), + .remove = ak8974_remove, .id_table = ak8974_id, }; module_i2c_driver(ak8974_driver);