Commit 836af7ab authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] dev_t handling cleanups (1/12)

removed unused kdev_t stuff, fixed a typo left from the
console->device() conversion.
parent 67c84f34
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "cfe_error.h" #include "cfe_error.h"
extern int cfe_cons_handle; extern int cfe_cons_handle;
static kdev_t cfe_consdev;
static void cfe_console_write(struct console *cons, const char *str, static void cfe_console_write(struct console *cons, const char *str,
unsigned int count) unsigned int count)
...@@ -57,15 +56,12 @@ static int cfe_console_setup(struct console *cons, char *str) ...@@ -57,15 +56,12 @@ static int cfe_console_setup(struct console *cons, char *str)
#ifdef CONFIG_SIBYTE_SB1250_DUART #ifdef CONFIG_SIBYTE_SB1250_DUART
if (!strcmp(consdev, "uart0")) { if (!strcmp(consdev, "uart0")) {
setleds("u0cn"); setleds("u0cn");
// cfe_consdev = MKDEV(TTY_MAJOR, SB1250_DUART_MINOR_BASE + 0);
} else if (!strcmp(consdev, "uart1")) { } else if (!strcmp(consdev, "uart1")) {
setleds("u1cn"); setleds("u1cn");
// cfe_consdev = MKDEV(TTY_MAJOR, SB1250_DUART_MINOR_BASE + 1);
#endif #endif
#ifdef CONFIG_VGA_CONSOLE #ifdef CONFIG_VGA_CONSOLE
} else if (!strcmp(consdev, "pcconsole0")) { } else if (!strcmp(consdev, "pcconsole0")) {
setleds("pccn"); setleds("pccn");
// cfe_consdev = MKDEV(TTY_MAJOR, 0);
#endif #endif
} else } else
return -ENODEV; return -ENODEV;
......
...@@ -2462,7 +2462,7 @@ void kgdb_map_scc(void) ...@@ -2462,7 +2462,7 @@ void kgdb_map_scc(void)
} }
#endif #endif
static kdev_t serial_console_device(struct console *c) static struct tty_driver *serial_console_device(struct console *c, int *index)
{ {
*index = c->index; *index = c->index;
return serial_driver; return serial_driver;
......
...@@ -90,23 +90,8 @@ static inline unsigned int kdev_val(kdev_t dev) ...@@ -90,23 +90,8 @@ static inline unsigned int kdev_val(kdev_t dev)
return dev.value; return dev.value;
} }
static inline kdev_t val_to_kdev(unsigned int val)
{
kdev_t dev;
dev.value = val;
return dev;
}
#define HASHDEV(dev) (kdev_val(dev))
#define NODEV (mk_kdev(0,0)) #define NODEV (mk_kdev(0,0))
static inline int kdev_same(kdev_t dev1, kdev_t dev2)
{
return dev1.value == dev2.value;
}
#define kdev_none(d1) (!kdev_val(d1))
/* Mask off the high bits for now.. */ /* Mask off the high bits for now.. */
#define minor(dev) ((dev).value & 0xff) #define minor(dev) ((dev).value & 0xff)
#define major(dev) (((dev).value >> KDEV_MINOR_BITS) & 0xff) #define major(dev) (((dev).value >> KDEV_MINOR_BITS) & 0xff)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment