Skip to content

Commit

Permalink
hwrng: pseries - remove incorrect __init/__exit markups
Browse files Browse the repository at this point in the history
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 <dmitry.torokhov@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Dmitry Torokhov authored and Herbert Xu committed Mar 11, 2015
1 parent 87094a0 commit 257bedd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/hw_random/pseries-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ static struct hwrng pseries_rng = {
.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)
{
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);
return 0;
Expand Down

0 comments on commit 257bedd

Please sign in to comment.