Skip to content

Commit

Permalink
hwrng: core - Move hwrng miscdev minor number to include/linux/miscde…
Browse files Browse the repository at this point in the history
…vice.h

This patch move the define for hwrng's miscdev minor number to
include/linux/miscdevice.h.
It's better that all minor number are in the same place.
Rename it to HWRNG_MINOR (from RNG_MISCDEV_MINOR) in he process since
no other miscdev define have MISCDEV in their name.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Corentin LABBE authored and Herbert Xu committed Dec 27, 2016
1 parent affdec5 commit fd50d71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/char/hw_random/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#define RNG_MODULE_NAME "hw_random"
#define PFX RNG_MODULE_NAME ": "
#define RNG_MISCDEV_MINOR 183 /* official */

static struct hwrng *current_rng;
static struct task_struct *hwrng_fill;
Expand Down Expand Up @@ -285,7 +284,7 @@ static const struct file_operations rng_chrdev_ops = {
static const struct attribute_group *rng_dev_groups[];

static struct miscdevice rng_miscdev = {
.minor = RNG_MISCDEV_MINOR,
.minor = HWRNG_MINOR,
.name = RNG_MODULE_NAME,
.nodename = "hwrng",
.fops = &rng_chrdev_ops,
Expand Down
1 change: 1 addition & 0 deletions include/linux/miscdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define SGI_MMTIMER 153
#define STORE_QUEUE_MINOR 155 /* unused */
#define I2O_MINOR 166
#define HWRNG_MINOR 183
#define MICROCODE_MINOR 184
#define IRNET_MINOR 187
#define VFIO_MINOR 196
Expand Down

0 comments on commit fd50d71

Please sign in to comment.