Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1539403

[PATCH 5/7] hwrng: core: Move hwrng miscdev minor number to include/linux/miscdevice.h

From Corentin Labbe <clabbe.montjoie@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 5/7] hwrng: core: Move hwrng miscdev minor number to include/linux/miscdevice.h
Date 2016-12-09 15:30 +0100
Message-ID <sMuls-4n9-51@gated-at.bofh.it> (permalink)
References <sMulr-4n9-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/char/hw_random/core.c | 3 +--
 include/linux/miscdevice.h    | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 7a2e496..1e1e385 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char/hw_random/core.c
@@ -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;
@@ -283,7 +282,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,
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 722698a..659f586 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -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 VFIO_MINOR		196
 #define TUN_MINOR		200
-- 
2.7.3

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/7] hwrng: core: do not use multiple blank lines Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-09 15:30 +0100
  [PATCH 6/7] hwrng: core: remove unused PFX macro Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-09 15:30 +0100
  [PATCH 4/7] hwrng: core: Replace asm/uaccess.h by linux/uaccess.h Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-09 15:30 +0100
  [PATCH 3/7] hwrng: core: Rewrite the header Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-09 15:30 +0100
  [PATCH 2/7] hwrng: core: rewrite better comparison to NULL Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-09 15:30 +0100
  [PATCH 7/7] hwrng: core: Remove two unused include Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-09 15:30 +0100
    Re: [PATCH 7/7] hwrng: core: Remove two unused include Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-09 19:30 +0100
  [PATCH 5/7] hwrng: core: Move hwrng miscdev minor number to include/linux/miscdevice.h Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-09 15:30 +0100

csiph-web