mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	misc: move FLASH_MINOR into miscdevice.h and fix conflicts
FLASH_MINOR is used in both drivers/char/nwflash.c and drivers/sbus/char/flash.c with conflict minor numbers. Move all the definitions of FLASH_MINOR into miscdevice.h. Rename FLASH_MINOR for drivers/char/nwflash.c to NWFLASH_MINOR and FLASH_MINOR for drivers/sbus/char/flash.c to SBUS_FLASH_MINOR. Link: https://lore.kernel.org/lkml/20200120221323.GJ15860@mit.edu/t/ Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Russell King <linux@armlinux.org.uk> Cc: "David S. Miller" <davem@davemloft.net> Link: https://lore.kernel.org/r/20200311071654.335-3-zhenzhong.duan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
		
							parent
							
								
									6ce6ae7c17
								
							
						
					
					
						commit
						2668dba6df
					
				
					 4 changed files with 4 additions and 5 deletions
				
			
		| 
						 | 
					@ -2,7 +2,6 @@
 | 
				
			||||||
#ifndef _FLASH_H
 | 
					#ifndef _FLASH_H
 | 
				
			||||||
#define _FLASH_H
 | 
					#define _FLASH_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define FLASH_MINOR		 160	/* MAJOR is 10 - miscdevice */
 | 
					 | 
				
			||||||
#define CMD_WRITE_DISABLE	 0
 | 
					#define CMD_WRITE_DISABLE	 0
 | 
				
			||||||
#define CMD_WRITE_ENABLE	 0x28
 | 
					#define CMD_WRITE_ENABLE	 0x28
 | 
				
			||||||
#define CMD_WRITE_BASE64K_ENABLE 0x47
 | 
					#define CMD_WRITE_BASE64K_ENABLE 0x47
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -576,7 +576,7 @@ static const struct file_operations flash_fops =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct miscdevice flash_miscdev =
 | 
					static struct miscdevice flash_miscdev =
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	FLASH_MINOR,
 | 
						NWFLASH_MINOR,
 | 
				
			||||||
	"nwflash",
 | 
						"nwflash",
 | 
				
			||||||
	&flash_fops
 | 
						&flash_fops
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,8 +31,6 @@ static struct {
 | 
				
			||||||
	unsigned long busy;		/* In use? */
 | 
						unsigned long busy;		/* In use? */
 | 
				
			||||||
} flash;
 | 
					} flash;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define FLASH_MINOR	152
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int
 | 
					static int
 | 
				
			||||||
flash_mmap(struct file *file, struct vm_area_struct *vma)
 | 
					flash_mmap(struct file *file, struct vm_area_struct *vma)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -157,7 +155,7 @@ static const struct file_operations flash_fops = {
 | 
				
			||||||
	.release =	flash_release,
 | 
						.release =	flash_release,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
 | 
					static struct miscdevice flash_dev = { SBUS_FLASH_MINOR, "flash", &flash_fops };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int flash_probe(struct platform_device *op)
 | 
					static int flash_probe(struct platform_device *op)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,12 +30,14 @@
 | 
				
			||||||
#define SUN_OPENPROM_MINOR	139
 | 
					#define SUN_OPENPROM_MINOR	139
 | 
				
			||||||
#define DMAPI_MINOR		140	/* unused */
 | 
					#define DMAPI_MINOR		140	/* unused */
 | 
				
			||||||
#define NVRAM_MINOR		144
 | 
					#define NVRAM_MINOR		144
 | 
				
			||||||
 | 
					#define SBUS_FLASH_MINOR	152
 | 
				
			||||||
#define SGI_MMTIMER		153
 | 
					#define SGI_MMTIMER		153
 | 
				
			||||||
#define PMU_MINOR		154
 | 
					#define PMU_MINOR		154
 | 
				
			||||||
#define STORE_QUEUE_MINOR	155	/* unused */
 | 
					#define STORE_QUEUE_MINOR	155	/* unused */
 | 
				
			||||||
#define LCD_MINOR		156
 | 
					#define LCD_MINOR		156
 | 
				
			||||||
#define AC_MINOR		157
 | 
					#define AC_MINOR		157
 | 
				
			||||||
#define BUTTON_MINOR		158	/* Major 10, Minor 158, /dev/nwbutton */
 | 
					#define BUTTON_MINOR		158	/* Major 10, Minor 158, /dev/nwbutton */
 | 
				
			||||||
 | 
					#define NWFLASH_MINOR		160	/* MAJOR is 10 - miscdevice */
 | 
				
			||||||
#define ENVCTRL_MINOR		162
 | 
					#define ENVCTRL_MINOR		162
 | 
				
			||||||
#define I2O_MINOR		166
 | 
					#define I2O_MINOR		166
 | 
				
			||||||
#define UCTRL_MINOR		174
 | 
					#define UCTRL_MINOR		174
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue