Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1590715 > unrolled thread

[PATCH] [media] ad5820: remove incorrect __exit markups

Started byDmitry Torokhov <dmitry.torokhov@gmail.com>
First post2017-03-02 01:20 +0100
Last post2017-03-02 11:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] [media] ad5820: remove incorrect __exit markups Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-03-02 01:20 +0100
    Re: [PATCH] [media] ad5820: remove incorrect __exit markups Pavel Machek <pavel@ucw.cz> - 2017-03-02 11:00 +0100

#1590715 — [PATCH] [media] ad5820: remove incorrect __exit markups

FromDmitry Torokhov <dmitry.torokhov@gmail.com>
Date2017-03-02 01:20 +0100
Subject[PATCH] [media] ad5820: remove incorrect __exit markups
Message-ID<tgmDo-2sk-25@gated-at.bofh.it>
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>
---
 drivers/media/i2c/ad5820.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c
index a9026a91855e..3d2a3c6b67d8 100644
--- a/drivers/media/i2c/ad5820.c
+++ b/drivers/media/i2c/ad5820.c
@@ -336,7 +336,7 @@ static int ad5820_probe(struct i2c_client *client,
 	return ret;
 }
 
-static int __exit ad5820_remove(struct i2c_client *client)
+static int ad5820_remove(struct i2c_client *client)
 {
 	struct v4l2_subdev *subdev = i2c_get_clientdata(client);
 	struct ad5820_device *coil = to_ad5820_device(subdev);
@@ -362,7 +362,7 @@ static struct i2c_driver ad5820_i2c_driver = {
 		.pm	= &ad5820_pm,
 	},
 	.probe		= ad5820_probe,
-	.remove		= __exit_p(ad5820_remove),
+	.remove		= ad5820_remove,
 	.id_table	= ad5820_id_table,
 };
 
-- 
2.12.0.rc1.440.g5b76565f74-goog


-- 
Dmitry

[toc] | [next] | [standalone]


#1590954

FromPavel Machek <pavel@ucw.cz>
Date2017-03-02 11:00 +0100
Message-ID<tgvGG-sV-25@gated-at.bofh.it>
In reply to#1590715

[Multipart message — attachments visible in raw view] — view raw

On Wed 2017-03-01 15:41:23, Dmitry Torokhov wrote:
> 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>

Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web