Skip to content

Commit 257bedd

Browse files
dtorherbertx
authored andcommitted
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: Dmitry Torokhov <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 87094a0 commit 257bedd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/char/hw_random/pseries-rng.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ static struct hwrng pseries_rng = {
6161
.read = pseries_rng_read,
6262
};
6363

64-
static int __init pseries_rng_probe(struct vio_dev *dev,
64+
static int pseries_rng_probe(struct vio_dev *dev,
6565
const struct vio_device_id *id)
6666
{
6767
return hwrng_register(&pseries_rng);
6868
}
6969

70-
static int __exit pseries_rng_remove(struct vio_dev *dev)
70+
static int pseries_rng_remove(struct vio_dev *dev)
7171
{
7272
hwrng_unregister(&pseries_rng);
7373
return 0;

0 commit comments

Comments
 (0)