From 8715c1cfadf8cce24e79d254f95bd4a84c7741f0 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Thu, 12 Apr 2007 01:34:14 -0400 Subject: Input: drivers/input/joystick - don't access dev->private directly Use input_get_drvdata() and input_set_drvdata() instead. Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/adi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/input/joystick/adi.c') diff --git a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c index 6279ced..e835352 100644 --- a/drivers/input/joystick/adi.c +++ b/drivers/input/joystick/adi.c @@ -290,7 +290,7 @@ static void adi_poll(struct gameport *gameport) static int adi_open(struct input_dev *dev) { - struct adi_port *port = dev->private; + struct adi_port *port = input_get_drvdata(dev); gameport_start_polling(port->gameport); return 0; @@ -302,7 +302,7 @@ static int adi_open(struct input_dev *dev) static void adi_close(struct input_dev *dev) { - struct adi_port *port = dev->private; + struct adi_port *port = input_get_drvdata(dev); gameport_stop_polling(port->gameport); } @@ -425,7 +425,8 @@ static int adi_init_input(struct adi *adi, struct adi_port *port, int half) input_dev->id.product = adi->id; input_dev->id.version = 0x0100; input_dev->cdev.dev = &port->gameport->dev; - input_dev->private = port; + + input_set_drvdata(input_dev, port); input_dev->open = adi_open; input_dev->close = adi_close; -- cgit v1.1