Skip to content

Commit fd50d71

Browse files
montjoieherbertx
authored andcommitted
hwrng: core - Move hwrng miscdev minor number to include/linux/miscdevice.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>
1 parent affdec5 commit fd50d71

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/char/hw_random/core.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
#define RNG_MODULE_NAME "hw_random"
2828
#define PFX RNG_MODULE_NAME ": "
29-
#define RNG_MISCDEV_MINOR 183 /* official */
3029

3130
static struct hwrng *current_rng;
3231
static struct task_struct *hwrng_fill;
@@ -285,7 +284,7 @@ static const struct file_operations rng_chrdev_ops = {
285284
static const struct attribute_group *rng_dev_groups[];
286285

287286
static struct miscdevice rng_miscdev = {
288-
.minor = RNG_MISCDEV_MINOR,
287+
.minor = HWRNG_MINOR,
289288
.name = RNG_MODULE_NAME,
290289
.nodename = "hwrng",
291290
.fops = &rng_chrdev_ops,

‎include/linux/miscdevice.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#define SGI_MMTIMER 153
3232
#define STORE_QUEUE_MINOR 155 /* unused */
3333
#define I2O_MINOR 166
34+
#define HWRNG_MINOR 183
3435
#define MICROCODE_MINOR 184
3536
#define IRNET_MINOR 187
3637
#define VFIO_MINOR 196

0 commit comments

Comments
 (0)