Skip to content

Commit 6ce6ae7

Browse files
Zhenzhong Duangregkh
authored andcommitted
misc: cleanup minor number definitions in c file into miscdevice.h
HWRNG_MINOR and RNG_MISCDEV_MINOR are duplicate definitions, use unified HWRNG_MINOR instead and moved into miscdevice.h ANSLCD_MINOR and LCD_MINOR are duplicate definitions, use unified LCD_MINOR instead and moved into miscdevice.h MISCDEV_MINOR is renamed to PXA3XX_GCU_MINOR and moved into miscdevice.h Other definitions are just moved without any change. Link: https://lore.kernel.org/lkml/20200120221323.GJ15860@mit.edu/t/ Suggested-by: Arnd Bergmann <arnd@arndb.de> Build-tested-by: Willy TARREAU <wtarreau@haproxy.com> Build-tested-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com> Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Link: https://lore.kernel.org/r/20200311071654.335-2-zhenzhong.duan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c23df7d commit 6ce6ae7

14 files changed

Lines changed: 15 additions & 27 deletions

File tree

‎arch/um/drivers/random.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#define RNG_VERSION "1.0.0"
2424
#define RNG_MODULE_NAME "hw_random"
2525

26-
#define RNG_MISCDEV_MINOR 183 /* official */
27-
2826
/* Changed at init time, in the non-modular case, and at module load
2927
* time, in the module case. Presumably, the module subsystem
3028
* protects against a module being loaded twice at the same time.
@@ -104,7 +102,7 @@ static const struct file_operations rng_chrdev_ops = {
104102

105103
/* rng_init shouldn't be called more than once at boot time */
106104
static struct miscdevice rng_miscdev = {
107-
RNG_MISCDEV_MINOR,
105+
HWRNG_MINOR,
108106
RNG_MODULE_NAME,
109107
&rng_chrdev_ops,
110108
};

‎drivers/auxdisplay/charlcd.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
#include "charlcd.h"
2424

25-
#define LCD_MINOR 156
26-
2725
#define DEFAULT_LCD_BWIDTH 40
2826
#define DEFAULT_LCD_HWIDTH 64
2927

‎drivers/auxdisplay/panel.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757

5858
#include "charlcd.h"
5959

60-
#define KEYPAD_MINOR 185
61-
6260
#define LCD_MAXBYTES 256 /* max burst write */
6361

6462
#define KEYPAD_BUFFER 64

‎drivers/char/applicom.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
#define MAX_BOARD 8 /* maximum of pc board possible */
5454
#define MAX_ISA_BOARD 4
5555
#define LEN_RAM_IO 0x800
56-
#define AC_MINOR 157
5756

5857
#ifndef PCI_VENDOR_ID_APPLICOM
5958
#define PCI_VENDOR_ID_APPLICOM 0x1389

‎drivers/char/nwbutton.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#define NUM_PRESSES_REBOOT 2 /* How many presses to activate shutdown */
1515
#define BUTTON_DELAY 30 /* How many jiffies for sequence to end */
1616
#define VERSION "0.3" /* Driver version number */
17-
#define BUTTON_MINOR 158 /* Major 10, Minor 158, /dev/nwbutton */
1817

1918
/* Structure definitions: */
2019

‎drivers/char/toshiba.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@
6161
#include <linux/mutex.h>
6262
#include <linux/toshiba.h>
6363

64-
#define TOSH_MINOR_DEV 181
65-
6664
MODULE_LICENSE("GPL");
6765
MODULE_AUTHOR("Jonathan Buzzard <jonathan@buzzard.org.uk>");
6866
MODULE_DESCRIPTION("Toshiba laptop SMM driver");

‎drivers/macintosh/ans-lcd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const struct file_operations anslcd_fops = {
142142
};
143143

144144
static struct miscdevice anslcd_dev = {
145-
ANSLCD_MINOR,
145+
LCD_MINOR,
146146
"anslcd",
147147
&anslcd_fops
148148
};

‎drivers/macintosh/ans-lcd.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#ifndef _PPC_ANS_LCD_H
33
#define _PPC_ANS_LCD_H
44

5-
#define ANSLCD_MINOR 156
6-
75
#define ANSLCD_CLEAR 0x01
86
#define ANSLCD_SENDCTRL 0x02
97
#define ANSLCD_SETSHORTDELAY 0x03

‎drivers/macintosh/via-pmu.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@
7575
/* Some compile options */
7676
#undef DEBUG_SLEEP
7777

78-
/* Misc minor number allocated for /dev/pmu */
79-
#define PMU_MINOR 154
80-
8178
/* How many iterations between battery polls */
8279
#define BATTERY_POLLING_COUNT 2
8380

‎drivers/sbus/char/envctrl.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
#define DRIVER_NAME "envctrl"
3838
#define PFX DRIVER_NAME ": "
3939

40-
#define ENVCTRL_MINOR 162
41-
4240
#define PCF8584_ADDRESS 0x55
4341

4442
#define CONTROL_PIN 0x80

0 commit comments

Comments
 (0)