git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
um
/
drivers
/
line.c
diff --git
a/arch/um/drivers/line.c
b/arch/um/drivers/line.c
index
6c2d4cc
..
83301e1
100644
(file)
--- a/
arch/um/drivers/line.c
+++ b/
arch/um/drivers/line.c
@@
-8,7
+8,6
@@
#include "linux/list.h"
#include "linux/kd.h"
#include "linux/interrupt.h"
#include "linux/list.h"
#include "linux/kd.h"
#include "linux/interrupt.h"
-#include "linux/devfs_fs_kernel.h"
#include "asm/uaccess.h"
#include "chan_kern.h"
#include "irq_user.h"
#include "asm/uaccess.h"
#include "chan_kern.h"
#include "irq_user.h"
@@
-21,7
+20,7
@@
#define LINE_BUFSIZE 4096
#define LINE_BUFSIZE 4096
-static irqreturn_t line_interrupt(int irq, void *data
, struct pt_regs *unused
)
+static irqreturn_t line_interrupt(int irq, void *data)
{
struct chan *chan = data;
struct line *line = chan->line;
{
struct chan *chan = data;
struct line *line = chan->line;
@@
-32,9
+31,9
@@
static irqreturn_t line_interrupt(int irq, void *data, struct pt_regs *unused)
return IRQ_HANDLED;
}
return IRQ_HANDLED;
}
-static void line_timer_cb(
void *arg
)
+static void line_timer_cb(
struct work_struct *work
)
{
{
- struct line *line =
arg
;
+ struct line *line =
container_of(work, struct line, task.work)
;
if(!line->throttled)
chan_interrupt(&line->chan_list, &line->task, line->tty,
if(!line->throttled)
chan_interrupt(&line->chan_list, &line->task, line->tty,
@@
-247,12
+246,12
@@
out_up:
return ret;
}
return ret;
}
-void line_set_termios(struct tty_struct *tty, struct termios * old)
+void line_set_termios(struct tty_struct *tty, struct
k
termios * old)
{
/* nothing */
}
{
/* nothing */
}
-static struct {
+static
const
struct {
int cmd;
char *level;
char *name;
int cmd;
char *level;
char *name;
@@
-365,8
+364,7
@@
void line_unthrottle(struct tty_struct *tty)
reactivate_chan(&line->chan_list, line->driver->read_irq);
}
reactivate_chan(&line->chan_list, line->driver->read_irq);
}
-static irqreturn_t line_write_interrupt(int irq, void *data,
- struct pt_regs *unused)
+static irqreturn_t line_write_interrupt(int irq, void *data)
{
struct chan *chan = data;
struct line *line = chan->line;
{
struct chan *chan = data;
struct line *line = chan->line;
@@
-374,7
+372,7
@@
static irqreturn_t line_write_interrupt(int irq, void *data,
int err;
/* Interrupts are enabled here because we registered the interrupt with
int err;
/* Interrupts are enabled here because we registered the interrupt with
- *
SA_INTERRUPT
(see line_setup_irq).*/
+ *
IRQF_DISABLED
(see line_setup_irq).*/
spin_lock_irq(&line->lock);
err = flush_buffer(line);
spin_lock_irq(&line->lock);
err = flush_buffer(line);
@@
-406,8
+404,8
@@
static irqreturn_t line_write_interrupt(int irq, void *data,
int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
{
int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
{
- struct line_driver *driver = line->driver;
- int err = 0, flags =
SA_INTERRUPT | SA_SHIRQ | SA
_SAMPLE_RANDOM;
+
const
struct line_driver *driver = line->driver;
+ int err = 0, flags =
IRQF_DISABLED | IRQF_SHARED | IRQF
_SAMPLE_RANDOM;
if (input)
err = um_request_irq(driver->read_irq, fd, IRQ_READ,
if (input)
err = um_request_irq(driver->read_irq, fd, IRQ_READ,
@@
-445,7
+443,7
@@
int line_open(struct line *lines, struct tty_struct *tty)
* is registered.
*/
enable_chan(line);
* is registered.
*/
enable_chan(line);
- INIT_
WORK(&line->task, line_timer_cb, line
);
+ INIT_
DELAYED_WORK(&line->task, line_timer_cb
);
if(!line->sigio){
chan_enable_winch(&line->chan_list, tty);
if(!line->sigio){
chan_enable_winch(&line->chan_list, tty);
@@
-498,7
+496,7
@@
void close_lines(struct line *lines, int nlines)
}
/* Common setup code for both startup command line and mconsole initialization.
}
/* Common setup code for both startup command line and mconsole initialization.
- * @lines contains the
the
array (of size @num) to modify;
+ * @lines contains the array (of size @num) to modify;
* @init is the setup string;
*/
* @init is the setup string;
*/
@@
-559,7
+557,7
@@
int line_setup(struct line *lines, unsigned int num, char *init)
}
int line_config(struct line *lines, unsigned int num, char *str,
}
int line_config(struct line *lines, unsigned int num, char *str,
- struct chan_opts *opts)
+
const
struct chan_opts *opts)
{
struct line *line;
char *new;
{
struct line *line;
char *new;
@@
-643,9
+641,9
@@
int line_remove(struct line *lines, unsigned int num, int n)
}
struct tty_driver *line_register_devfs(struct lines *set,
}
struct tty_driver *line_register_devfs(struct lines *set,
- struct line_driver *line_driver,
-
struct tty_operations *ops, struct line *line
s,
- int nlines)
+
struct line_driver *line_driver,
+
const struct tty_operations *op
s,
+
struct line *lines,
int nlines)
{
int i;
struct tty_driver *driver = alloc_tty_driver(nlines);
{
int i;
struct tty_driver *driver = alloc_tty_driver(nlines);
@@
-655,7
+653,6
@@
struct tty_driver *line_register_devfs(struct lines *set,
driver->driver_name = line_driver->name;
driver->name = line_driver->device_name;
driver->driver_name = line_driver->name;
driver->name = line_driver->device_name;
- driver->devfs_name = line_driver->devfs_name;
driver->major = line_driver->major;
driver->minor_start = line_driver->minor_start;
driver->type = line_driver->type;
driver->major = line_driver->major;
driver->minor_start = line_driver->minor_start;
driver->type = line_driver->type;
@@
-714,7
+711,7
@@
struct winch {
struct tty_struct *tty;
};
struct tty_struct *tty;
};
-static irqreturn_t winch_interrupt(int irq, void *data
, struct pt_regs *unused
)
+static irqreturn_t winch_interrupt(int irq, void *data)
{
struct winch *winch = data;
struct tty_struct *tty;
{
struct winch *winch = data;
struct tty_struct *tty;
@@
-769,7
+766,7
@@
void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty)
spin_unlock(&winch_handler_lock);
if(um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
spin_unlock(&winch_handler_lock);
if(um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
-
SA_INTERRUPT | SA_SHIRQ | SA
_SAMPLE_RANDOM,
+
IRQF_DISABLED | IRQF_SHARED | IRQF
_SAMPLE_RANDOM,
"winch", winch) < 0)
printk("register_winch_irq - failed to register IRQ\n");
}
"winch", winch) < 0)
printk("register_winch_irq - failed to register IRQ\n");
}