提交 257bedd4 编写于 作者: D Dmitry Torokhov 提交者: Herbert Xu

hwrng: pseries - remove incorrect __init/__exit markups

Even if bus is not hot-pluggable, the 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.

Similarly probe() methods should not be marked __init unless
platform_driver_probe() is used.
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 87094a04
...@@ -61,13 +61,13 @@ static struct hwrng pseries_rng = { ...@@ -61,13 +61,13 @@ static struct hwrng pseries_rng = {
.read = pseries_rng_read, .read = pseries_rng_read,
}; };
static int __init pseries_rng_probe(struct vio_dev *dev, static int pseries_rng_probe(struct vio_dev *dev,
const struct vio_device_id *id) const struct vio_device_id *id)
{ {
return hwrng_register(&pseries_rng); return hwrng_register(&pseries_rng);
} }
static int __exit pseries_rng_remove(struct vio_dev *dev) static int pseries_rng_remove(struct vio_dev *dev)
{ {
hwrng_unregister(&pseries_rng); hwrng_unregister(&pseries_rng);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册