Commit 7990a353 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: rename serio->driver to serio->port_data in preparation

       to sysfs integration
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent cac8e9e5
......@@ -214,7 +214,7 @@ static int synaptics_set_mode(struct psmouse *psmouse, int mode)
****************************************************************************/
static int synaptics_pt_write(struct serio *port, unsigned char c)
{
struct psmouse *parent = port->driver;
struct psmouse *parent = port->port_data;
char rate_param = SYN_PS_CLIENT_CMD; /* indicates that we want pass-through port */
if (psmouse_sliced_command(parent, c))
......@@ -273,7 +273,7 @@ static void synaptics_pt_create(struct psmouse *psmouse)
port->serio.name = "Synaptics pass-through";
port->serio.phys = "synaptics-pt/serio0";
port->serio.write = synaptics_pt_write;
port->serio.driver = psmouse;
port->serio.port_data = psmouse;
port->activate = synaptics_pt_activate;
}
......
......@@ -54,7 +54,7 @@ static irqreturn_t amba_kmi_int(int irq, void *dev_id, struct pt_regs *regs)
static int amba_kmi_write(struct serio *io, unsigned char val)
{
struct amba_kmi_port *kmi = io->driver;
struct amba_kmi_port *kmi = io->port_data;
unsigned int timeleft = 10000; /* timeout in 100ms */
while ((readb(KMISTAT) & KMISTAT_TXEMPTY) == 0 && timeleft--)
......@@ -68,7 +68,7 @@ static int amba_kmi_write(struct serio *io, unsigned char val)
static int amba_kmi_open(struct serio *io)
{
struct amba_kmi_port *kmi = io->driver;
struct amba_kmi_port *kmi = io->port_data;
unsigned int divisor;
int ret;
......@@ -105,7 +105,7 @@ static int amba_kmi_open(struct serio *io)
static void amba_kmi_close(struct serio *io)
{
struct amba_kmi_port *kmi = io->driver;
struct amba_kmi_port *kmi = io->port_data;
writeb(0, KMICR);
......@@ -137,7 +137,7 @@ static int amba_kmi_probe(struct amba_device *dev, void *id)
kmi->io.close = amba_kmi_close;
kmi->io.name = dev->dev.bus_id;
kmi->io.phys = dev->dev.bus_id;
kmi->io.driver = kmi;
kmi->io.port_data = kmi;
kmi->base = ioremap(dev->res.start, KMI_SIZE);
if (!kmi->base) {
......
......@@ -288,7 +288,7 @@ static irqreturn_t gscps2_interrupt(int irq, void *dev, struct pt_regs *regs)
static int gscps2_write(struct serio *port, unsigned char data)
{
struct gscps2port *ps2port = port->driver;
struct gscps2port *ps2port = port->port_data;
if (!gscps2_writeb_output(ps2port, data)) {
printk(KERN_DEBUG PFX "sending byte %#x failed.\n", data);
......@@ -304,7 +304,7 @@ static int gscps2_write(struct serio *port, unsigned char data)
static int gscps2_open(struct serio *port)
{
struct gscps2port *ps2port = port->driver;
struct gscps2port *ps2port = port->port_data;
gscps2_reset(ps2port);
......@@ -319,7 +319,7 @@ static int gscps2_open(struct serio *port)
static void gscps2_close(struct serio *port)
{
struct gscps2port *ps2port = port->driver;
struct gscps2port *ps2port = port->port_data;
gscps2_enable(ps2port, DISABLE);
}
......@@ -372,7 +372,7 @@ static int __init gscps2_probe(struct parisc_device *dev)
(ps2port->id == GSC_ID_KEYBOARD) ? "keyboard" : "mouse" );
memcpy(&ps2port->port, &gscps2_serio_port, sizeof(gscps2_serio_port));
ps2port->port.driver = ps2port;
ps2port->port.port_data = ps2port;
ps2port->port.name = ps2port->name;
ps2port->port.phys = dev->dev.bus_id;
......
......@@ -223,7 +223,7 @@ static int i8042_kbd_write(struct serio *port, unsigned char c)
static int i8042_aux_write(struct serio *port, unsigned char c)
{
struct i8042_values *values = port->driver;
struct i8042_values *values = port->port_data;
int retval;
/*
......@@ -251,7 +251,7 @@ static int i8042_aux_write(struct serio *port, unsigned char c)
static int i8042_activate_port(struct serio *port)
{
struct i8042_values *values = port->driver;
struct i8042_values *values = port->port_data;
i8042_flush();
......@@ -279,7 +279,7 @@ static int i8042_activate_port(struct serio *port)
static int i8042_open(struct serio *port)
{
struct i8042_values *values = port->driver;
struct i8042_values *values = port->port_data;
if (values->mux != -1)
if (i8042_mux_open++)
......@@ -318,7 +318,7 @@ static int i8042_open(struct serio *port)
static void i8042_close(struct serio *port)
{
struct i8042_values *values = port->driver;
struct i8042_values *values = port->port_data;
if (values->mux != -1)
if (--i8042_mux_open)
......@@ -353,7 +353,7 @@ static struct serio i8042_kbd_port =
.write = i8042_kbd_write,
.open = i8042_open,
.close = i8042_close,
.driver = &i8042_kbd_values,
.port_data = &i8042_kbd_values,
.name = "i8042 Kbd Port",
.phys = I8042_KBD_PHYS_DESC,
};
......@@ -371,7 +371,7 @@ static struct serio i8042_aux_port =
.write = i8042_aux_write,
.open = i8042_open,
.close = i8042_close,
.driver = &i8042_aux_values,
.port_data = &i8042_aux_values,
.name = "i8042 Aux Port",
.phys = I8042_AUX_PHYS_DESC,
};
......@@ -941,7 +941,7 @@ static void __init i8042_init_mux_values(struct i8042_values *values, struct ser
sprintf(i8042_mux_short[index], "AUX%d", index);
port->name = i8042_mux_names[index];
port->phys = i8042_mux_phys[index];
port->driver = values;
port->port_data = values;
values->name = i8042_mux_short[index];
values->mux = index;
}
......
......@@ -54,7 +54,7 @@ struct maceps2_data {
static int maceps2_write(struct serio *dev, unsigned char val)
{
struct mace_ps2port *port = ((struct maceps2_data *)dev->driver)->port;
struct mace_ps2port *port = ((struct maceps2_data *)dev->port_data)->port;
unsigned int timeout = MACE_PS2_TIMEOUT;
do {
......@@ -72,7 +72,7 @@ static irqreturn_t maceps2_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{
struct serio *dev = dev_id;
struct mace_ps2port *port = ((struct maceps2_data *)dev->driver)->port;
struct mace_ps2port *port = ((struct maceps2_data *)dev->port_data)->port;
unsigned int byte;
if (mace_read(port->status) & PS2_STATUS_RX_FULL) {
......@@ -85,7 +85,7 @@ static irqreturn_t maceps2_interrupt(int irq, void *dev_id,
static int maceps2_open(struct serio *dev)
{
struct maceps2_data *data = (struct maceps2_data *)dev->driver;
struct maceps2_data *data = (struct maceps2_data *)dev->port_data;
if (request_irq(data->irq, maceps2_interrupt, 0, "PS/2 port", dev)) {
printk(KERN_ERR "Could not allocate PS/2 IRQ\n");
......@@ -106,7 +106,7 @@ static int maceps2_open(struct serio *dev)
static void maceps2_close(struct serio *dev)
{
struct maceps2_data *data = (struct maceps2_data *)dev->driver;
struct maceps2_data *data = (struct maceps2_data *)dev->port_data;
mace_write(PS2_CONTROL_TX_CLOCK_DISABLE | PS2_CONTROL_RESET,
data->port->control);
......@@ -124,7 +124,7 @@ static struct serio maceps2_port0 =
.write = maceps2_write,
.name = "MACE PS/2 port0",
.phys = "mace/serio0",
.driver = &port0_data,
.port_data = &port0_data,
};
static struct serio maceps2_port1 =
......@@ -135,7 +135,7 @@ static struct serio maceps2_port1 =
.write = maceps2_write,
.name = "MACE PS/2 port1",
.phys = "mace/serio1",
.driver = &port1_data,
.port_data = &port1_data,
};
static int __init maceps2_init(void)
......
......@@ -45,7 +45,7 @@ struct pcips2_data {
static int pcips2_write(struct serio *io, unsigned char val)
{
struct pcips2_data *ps2if = io->driver;
struct pcips2_data *ps2if = io->port_data;
unsigned int stat;
do {
......@@ -101,7 +101,7 @@ static void pcips2_flush_input(struct pcips2_data *ps2if)
static int pcips2_open(struct serio *io)
{
struct pcips2_data *ps2if = io->driver;
struct pcips2_data *ps2if = io->port_data;
int ret, val = 0;
outb(PS2_CTRL_ENABLE, ps2if->base);
......@@ -119,7 +119,7 @@ static int pcips2_open(struct serio *io)
static void pcips2_close(struct serio *io)
{
struct pcips2_data *ps2if = io->driver;
struct pcips2_data *ps2if = io->port_data;
outb(0, ps2if->base);
......@@ -155,7 +155,7 @@ static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_i
ps2if->io.close = pcips2_close;
ps2if->io.name = pci_name(dev);
ps2if->io.phys = dev->dev.bus_id;
ps2if->io.driver = ps2if;
ps2if->io.port_data = ps2if;
ps2if->dev = dev;
ps2if->base = pci_resource_start(dev, 0);
......
......@@ -95,7 +95,7 @@ static irqreturn_t ps2_txint(int irq, void *dev_id, struct pt_regs *regs)
*/
static int ps2_write(struct serio *io, unsigned char val)
{
struct ps2if *ps2if = io->driver;
struct ps2if *ps2if = io->port_data;
unsigned long flags;
unsigned int head;
......@@ -122,7 +122,7 @@ static int ps2_write(struct serio *io, unsigned char val)
static int ps2_open(struct serio *io)
{
struct ps2if *ps2if = io->driver;
struct ps2if *ps2if = io->port_data;
int ret;
sa1111_enable_device(ps2if->dev);
......@@ -154,7 +154,7 @@ static int ps2_open(struct serio *io)
static void ps2_close(struct serio *io)
{
struct ps2if *ps2if = io->driver;
struct ps2if *ps2if = io->port_data;
sa1111_writel(0, ps2if->base + SA1111_PS2CR);
......@@ -247,7 +247,7 @@ static int ps2_probe(struct sa1111_dev *dev)
ps2if->io.close = ps2_close;
ps2if->io.name = dev->dev.bus_id;
ps2if->io.phys = dev->dev.bus_id;
ps2if->io.driver = ps2if;
ps2if->io.port_data = ps2if;
ps2if->dev = dev;
sa1111_set_drvdata(dev, ps2if);
......
......@@ -44,13 +44,13 @@ char serport_name[] = "Serial port";
static int serport_serio_write(struct serio *serio, unsigned char data)
{
struct serport *serport = serio->driver;
struct serport *serport = serio->port_data;
return -(serport->tty->driver->write(serport->tty, 0, &data, 1) != 1);
}
static void serport_serio_close(struct serio *serio)
{
struct serport *serport = serio->driver;
struct serport *serport = serio->port_data;
serport->serio.type = 0;
wake_up_interruptible(&serport->wait);
......@@ -83,7 +83,7 @@ static int serport_ldisc_open(struct tty_struct *tty)
serport->serio.type = SERIO_RS232;
serport->serio.write = serport_serio_write;
serport->serio.close = serport_serio_close;
serport->serio.driver = serport;
serport->serio.port_data = serport;
init_waitqueue_head(&serport->wait);
......
......@@ -994,7 +994,7 @@ static spinlock_t sunsu_serio_lock = SPIN_LOCK_UNLOCKED;
static int sunsu_serio_write(struct serio *serio, unsigned char ch)
{
struct uart_sunsu_port *up = serio->driver;
struct uart_sunsu_port *up = serio->port_data;
unsigned long flags;
int lsr;
......@@ -1014,7 +1014,7 @@ static int sunsu_serio_write(struct serio *serio, unsigned char ch)
static int sunsu_serio_open(struct serio *serio)
{
struct uart_sunsu_port *up = serio->driver;
struct uart_sunsu_port *up = serio->port_data;
unsigned long flags;
int ret;
......@@ -1031,7 +1031,7 @@ static int sunsu_serio_open(struct serio *serio)
static void sunsu_serio_close(struct serio *serio)
{
struct uart_sunsu_port *up = serio->driver;
struct uart_sunsu_port *up = serio->port_data;
unsigned long flags;
spin_lock_irqsave(&sunsu_serio_lock, flags);
......@@ -1311,7 +1311,7 @@ static int __init sunsu_kbd_ms_init(void)
#ifdef CONFIG_SERIO
memset(&up->serio, 0, sizeof(up->serio));
up->serio.driver = up;
up->serio.port_data = up;
up->serio.type = SERIO_RS232;
if (up->su_type == SU_PORT_KBD) {
......
......@@ -1295,7 +1295,7 @@ static spinlock_t sunzilog_serio_lock = SPIN_LOCK_UNLOCKED;
static int sunzilog_serio_write(struct serio *serio, unsigned char ch)
{
struct uart_sunzilog_port *up = serio->driver;
struct uart_sunzilog_port *up = serio->port_data;
unsigned long flags;
spin_lock_irqsave(&sunzilog_serio_lock, flags);
......@@ -1309,7 +1309,7 @@ static int sunzilog_serio_write(struct serio *serio, unsigned char ch)
static int sunzilog_serio_open(struct serio *serio)
{
struct uart_sunzilog_port *up = serio->driver;
struct uart_sunzilog_port *up = serio->port_data;
unsigned long flags;
int ret;
......@@ -1326,7 +1326,7 @@ static int sunzilog_serio_open(struct serio *serio)
static void sunzilog_serio_close(struct serio *serio)
{
struct uart_sunzilog_port *up = serio->driver;
struct uart_sunzilog_port *up = serio->port_data;
unsigned long flags;
spin_lock_irqsave(&sunzilog_serio_lock, flags);
......@@ -1549,7 +1549,7 @@ static void __init sunzilog_init_kbdms(struct uart_sunzilog_port *up, int channe
#ifdef CONFIG_SERIO
memset(&up->serio, 0, sizeof(up->serio));
up->serio.driver = up;
up->serio.port_data = up;
up->serio.type = SERIO_RS232;
if (channel == KEYBOARD_LINE) {
......
......@@ -21,7 +21,7 @@
struct serio {
void *private;
void *driver;
void *port_data;
char *name;
char *phys;
......
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