From: Dmitry Torokhov <dtor_core@ameritech.net>
To: InputML <linux-input@atrey.karlin.mff.cuni.cz>
Cc: alsa-devel@alsa-project.org, LKML <linux-kernel@vger.kernel.org>,
Vojtech Pavlik <vojtech@suse.cz>
Subject: [PATCH 1/10] Gameport: rename driver to port_data
Date: Fri, 11 Feb 2005 01:59:50 -0500 [thread overview]
Message-ID: <200502110159.51020.dtor_core@ameritech.net> (raw)
In-Reply-To: <200502110158.47872.dtor_core@ameritech.net>
===================================================================
ChangeSet@1.2149, 2005-02-11 01:09:43-05:00, dtor_core@ameritech.net
Input: rename gameport->driver to gameport->port_data in preparation
to sysfs integration.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/gameport/lightning.c | 8 ++++----
drivers/input/gameport/vortex.c | 10 +++++-----
drivers/input/joystick/a3d.c | 8 ++++----
include/linux/gameport.h | 4 ++--
sound/oss/trident.c | 10 +++++-----
sound/pci/au88x0/au88x0_game.c | 15 +++++++--------
6 files changed, 27 insertions(+), 28 deletions(-)
===================================================================
diff -Nru a/drivers/input/gameport/lightning.c b/drivers/input/gameport/lightning.c
--- a/drivers/input/gameport/lightning.c 2005-02-11 01:34:39 -05:00
+++ b/drivers/input/gameport/lightning.c 2005-02-11 01:34:39 -05:00
@@ -79,7 +79,7 @@
static int l4_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
- struct l4 *l4 = gameport->driver;
+ struct l4 *l4 = gameport->port_data;
unsigned char status;
int i, result = -1;
@@ -112,7 +112,7 @@
static int l4_open(struct gameport *gameport, int mode)
{
- struct l4 *l4 = gameport->driver;
+ struct l4 *l4 = gameport->port_data;
if (l4->port != 0 && mode != GAMEPORT_MODE_COOKED)
return -1;
outb(L4_SELECT_ANALOG, L4_PORT);
@@ -190,7 +190,7 @@
{
int i, t;
int cal[4];
- struct l4 *l4 = gameport->driver;
+ struct l4 *l4 = gameport->port_data;
if (l4_getcal(l4->port, cal))
return -1;
@@ -252,7 +252,7 @@
sprintf(l4->phys, "isa%04x/gameport%d", L4_PORT, 4 * i + j);
gameport = &l4->gameport;
- gameport->driver = l4;
+ gameport->port_data = l4;
gameport->open = l4_open;
gameport->cooked_read = l4_cooked_read;
gameport->calibrate = l4_calibrate;
diff -Nru a/drivers/input/gameport/vortex.c b/drivers/input/gameport/vortex.c
--- a/drivers/input/gameport/vortex.c 2005-02-11 01:34:39 -05:00
+++ b/drivers/input/gameport/vortex.c 2005-02-11 01:34:39 -05:00
@@ -62,19 +62,19 @@
static unsigned char vortex_read(struct gameport *gameport)
{
- struct vortex *vortex = gameport->driver;
+ struct vortex *vortex = gameport->port_data;
return readb(vortex->io + VORTEX_LEG);
}
static void vortex_trigger(struct gameport *gameport)
{
- struct vortex *vortex = gameport->driver;
+ struct vortex *vortex = gameport->port_data;
writeb(0xff, vortex->io + VORTEX_LEG);
}
static int vortex_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
- struct vortex *vortex = gameport->driver;
+ struct vortex *vortex = gameport->port_data;
int i;
*buttons = (~readb(vortex->base + VORTEX_LEG) >> 4) & 0xf;
@@ -89,7 +89,7 @@
static int vortex_open(struct gameport *gameport, int mode)
{
- struct vortex *vortex = gameport->driver;
+ struct vortex *vortex = gameport->port_data;
switch (mode) {
case GAMEPORT_MODE_COOKED:
@@ -120,7 +120,7 @@
pci_set_drvdata(dev, vortex);
- vortex->gameport.driver = vortex;
+ vortex->gameport.port_data = vortex;
vortex->gameport.fuzz = 64;
vortex->gameport.read = vortex_read;
diff -Nru a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c
--- a/drivers/input/joystick/a3d.c 2005-02-11 01:34:39 -05:00
+++ b/drivers/input/joystick/a3d.c 2005-02-11 01:34:39 -05:00
@@ -197,7 +197,7 @@
static int a3d_adc_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
- struct a3d *a3d = gameport->driver;
+ struct a3d *a3d = gameport->port_data;
int i;
for (i = 0; i < 4; i++)
axes[i] = (a3d->axes[i] < 254) ? a3d->axes[i] : -1;
@@ -212,7 +212,7 @@
static int a3d_adc_open(struct gameport *gameport, int mode)
{
- struct a3d *a3d = gameport->driver;
+ struct a3d *a3d = gameport->port_data;
if (mode != GAMEPORT_MODE_COOKED)
return -1;
if (!a3d->used++)
@@ -226,7 +226,7 @@
static void a3d_adc_close(struct gameport *gameport)
{
- struct a3d *a3d = gameport->driver;
+ struct a3d *a3d = gameport->port_data;
if (!--a3d->used)
del_timer(&a3d->timer);
}
@@ -336,7 +336,7 @@
a3d->dev.relbit[0] |= BIT(REL_X) | BIT(REL_Y);
a3d->dev.keybit[LONG(BTN_MOUSE)] |= BIT(BTN_RIGHT) | BIT(BTN_LEFT) | BIT(BTN_MIDDLE);
- a3d->adc.driver = a3d;
+ a3d->adc.port_data = a3d;
a3d->adc.open = a3d_adc_open;
a3d->adc.close = a3d_adc_close;
a3d->adc.cooked_read = a3d_adc_cooked_read;
diff -Nru a/include/linux/gameport.h b/include/linux/gameport.h
--- a/include/linux/gameport.h 2005-02-11 01:34:39 -05:00
+++ b/include/linux/gameport.h 2005-02-11 01:34:39 -05:00
@@ -17,8 +17,8 @@
struct gameport {
- void *private; /* Private pointer for joystick drivers */
- void *driver; /* Private pointer for gameport drivers */
+ void *private; /* Private pointer for joystick drivers */
+ void *port_data; /* Private pointer for gameport drivers */
char *name;
char *phys;
diff -Nru a/sound/oss/trident.c b/sound/oss/trident.c
--- a/sound/oss/trident.c 2005-02-11 01:34:39 -05:00
+++ b/sound/oss/trident.c 2005-02-11 01:34:39 -05:00
@@ -4257,21 +4257,21 @@
static unsigned char
trident_game_read(struct gameport *gameport)
{
- struct trident_card *card = gameport->driver;
+ struct trident_card *card = gameport->port_data;
return inb(TRID_REG(card, T4D_GAME_LEG));
}
static void
trident_game_trigger(struct gameport *gameport)
{
- struct trident_card *card = gameport->driver;
+ struct trident_card *card = gameport->port_data;
outb(0xff, TRID_REG(card, T4D_GAME_LEG));
}
static int
trident_game_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
- struct trident_card *card = gameport->driver;
+ struct trident_card *card = gameport->port_data;
int i;
*buttons = (~inb(TRID_REG(card, T4D_GAME_LEG)) >> 4) & 0xf;
@@ -4288,7 +4288,7 @@
static int
trident_game_open(struct gameport *gameport, int mode)
{
- struct trident_card *card = gameport->driver;
+ struct trident_card *card = gameport->port_data;
switch (mode) {
case GAMEPORT_MODE_COOKED:
@@ -4368,7 +4368,7 @@
card->banks[BANK_B].addresses = &bank_b_addrs;
card->banks[BANK_B].bitmap = 0UL;
- card->gameport.driver = card;
+ card->gameport.port_data = card;
card->gameport.fuzz = 64;
card->gameport.read = trident_game_read;
card->gameport.trigger = trident_game_trigger;
diff -Nru a/sound/pci/au88x0/au88x0_game.c b/sound/pci/au88x0/au88x0_game.c
--- a/sound/pci/au88x0/au88x0_game.c 2005-02-11 01:34:39 -05:00
+++ b/sound/pci/au88x0/au88x0_game.c 2005-02-11 01:34:39 -05:00
@@ -44,20 +44,20 @@
static unsigned char vortex_game_read(struct gameport *gameport)
{
- vortex_t *vortex = gameport->driver;
+ vortex_t *vortex = gameport->port_data;
return hwread(vortex->mmio, VORTEX_GAME_LEGACY);
}
static void vortex_game_trigger(struct gameport *gameport)
{
- vortex_t *vortex = gameport->driver;
+ vortex_t *vortex = gameport->port_data;
hwwrite(vortex->mmio, VORTEX_GAME_LEGACY, 0xff);
}
static int
vortex_game_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
- vortex_t *vortex = gameport->driver;
+ vortex_t *vortex = gameport->port_data;
int i;
*buttons = (~hwread(vortex->mmio, VORTEX_GAME_LEGACY) >> 4) & 0xf;
@@ -73,7 +73,7 @@
static int vortex_game_open(struct gameport *gameport, int mode)
{
- vortex_t *vortex = gameport->driver;
+ vortex_t *vortex = gameport->port_data;
switch (mode) {
case GAMEPORT_MODE_COOKED:
@@ -96,11 +96,10 @@
static int vortex_gameport_register(vortex_t * vortex)
{
- if ((vortex->gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL)) == NULL) {
+ if ((vortex->gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL)) == NULL)
return -1;
- };
-
- vortex->gameport->driver = vortex;
+
+ vortex->gameport->port_data = vortex;
vortex->gameport->fuzz = 64;
vortex->gameport->read = vortex_game_read;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: InputML <linux-input@atrey.karlin.mff.cuni.cz>
Cc: alsa-devel@alsa-project.org, LKML <linux-kernel@vger.kernel.org>,
Vojtech Pavlik <vojtech@suse.cz>
Subject: [PATCH 1/10] Gameport: rename driver to port_data
Date: Fri, 11 Feb 2005 01:59:50 -0500 [thread overview]
Message-ID: <200502110159.51020.dtor_core@ameritech.net> (raw)
In-Reply-To: <200502110158.47872.dtor_core@ameritech.net>
===================================================================
ChangeSet@1.2149, 2005-02-11 01:09:43-05:00, dtor_core@ameritech.net
Input: rename gameport->driver to gameport->port_data in preparation
to sysfs integration.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/gameport/lightning.c | 8 ++++----
drivers/input/gameport/vortex.c | 10 +++++-----
drivers/input/joystick/a3d.c | 8 ++++----
include/linux/gameport.h | 4 ++--
sound/oss/trident.c | 10 +++++-----
sound/pci/au88x0/au88x0_game.c | 15 +++++++--------
6 files changed, 27 insertions(+), 28 deletions(-)
===================================================================
diff -Nru a/drivers/input/gameport/lightning.c b/drivers/input/gameport/lightning.c
--- a/drivers/input/gameport/lightning.c 2005-02-11 01:34:39 -05:00
+++ b/drivers/input/gameport/lightning.c 2005-02-11 01:34:39 -05:00
@@ -79,7 +79,7 @@
static int l4_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
- struct l4 *l4 = gameport->driver;
+ struct l4 *l4 = gameport->port_data;
unsigned char status;
int i, result = -1;
@@ -112,7 +112,7 @@
static int l4_open(struct gameport *gameport, int mode)
{
- struct l4 *l4 = gameport->driver;
+ struct l4 *l4 = gameport->port_data;
if (l4->port != 0 && mode != GAMEPORT_MODE_COOKED)
return -1;
outb(L4_SELECT_ANALOG, L4_PORT);
@@ -190,7 +190,7 @@
{
int i, t;
int cal[4];
- struct l4 *l4 = gameport->driver;
+ struct l4 *l4 = gameport->port_data;
if (l4_getcal(l4->port, cal))
return -1;
@@ -252,7 +252,7 @@
sprintf(l4->phys, "isa%04x/gameport%d", L4_PORT, 4 * i + j);
gameport = &l4->gameport;
- gameport->driver = l4;
+ gameport->port_data = l4;
gameport->open = l4_open;
gameport->cooked_read = l4_cooked_read;
gameport->calibrate = l4_calibrate;
diff -Nru a/drivers/input/gameport/vortex.c b/drivers/input/gameport/vortex.c
--- a/drivers/input/gameport/vortex.c 2005-02-11 01:34:39 -05:00
+++ b/drivers/input/gameport/vortex.c 2005-02-11 01:34:39 -05:00
@@ -62,19 +62,19 @@
static unsigned char vortex_read(struct gameport *gameport)
{
- struct vortex *vortex = gameport->driver;
+ struct vortex *vortex = gameport->port_data;
return readb(vortex->io + VORTEX_LEG);
}
static void vortex_trigger(struct gameport *gameport)
{
- struct vortex *vortex = gameport->driver;
+ struct vortex *vortex = gameport->port_data;
writeb(0xff, vortex->io + VORTEX_LEG);
}
static int vortex_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
- struct vortex *vortex = gameport->driver;
+ struct vortex *vortex = gameport->port_data;
int i;
*buttons = (~readb(vortex->base + VORTEX_LEG) >> 4) & 0xf;
@@ -89,7 +89,7 @@
static int vortex_open(struct gameport *gameport, int mode)
{
- struct vortex *vortex = gameport->driver;
+ struct vortex *vortex = gameport->port_data;
switch (mode) {
case GAMEPORT_MODE_COOKED:
@@ -120,7 +120,7 @@
pci_set_drvdata(dev, vortex);
- vortex->gameport.driver = vortex;
+ vortex->gameport.port_data = vortex;
vortex->gameport.fuzz = 64;
vortex->gameport.read = vortex_read;
diff -Nru a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c
--- a/drivers/input/joystick/a3d.c 2005-02-11 01:34:39 -05:00
+++ b/drivers/input/joystick/a3d.c 2005-02-11 01:34:39 -05:00
@@ -197,7 +197,7 @@
static int a3d_adc_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
- struct a3d *a3d = gameport->driver;
+ struct a3d *a3d = gameport->port_data;
int i;
for (i = 0; i < 4; i++)
axes[i] = (a3d->axes[i] < 254) ? a3d->axes[i] : -1;
@@ -212,7 +212,7 @@
static int a3d_adc_open(struct gameport *gameport, int mode)
{
- struct a3d *a3d = gameport->driver;
+ struct a3d *a3d = gameport->port_data;
if (mode != GAMEPORT_MODE_COOKED)
return -1;
if (!a3d->used++)
@@ -226,7 +226,7 @@
static void a3d_adc_close(struct gameport *gameport)
{
- struct a3d *a3d = gameport->driver;
+ struct a3d *a3d = gameport->port_data;
if (!--a3d->used)
del_timer(&a3d->timer);
}
@@ -336,7 +336,7 @@
a3d->dev.relbit[0] |= BIT(REL_X) | BIT(REL_Y);
a3d->dev.keybit[LONG(BTN_MOUSE)] |= BIT(BTN_RIGHT) | BIT(BTN_LEFT) | BIT(BTN_MIDDLE);
- a3d->adc.driver = a3d;
+ a3d->adc.port_data = a3d;
a3d->adc.open = a3d_adc_open;
a3d->adc.close = a3d_adc_close;
a3d->adc.cooked_read = a3d_adc_cooked_read;
diff -Nru a/include/linux/gameport.h b/include/linux/gameport.h
--- a/include/linux/gameport.h 2005-02-11 01:34:39 -05:00
+++ b/include/linux/gameport.h 2005-02-11 01:34:39 -05:00
@@ -17,8 +17,8 @@
struct gameport {
- void *private; /* Private pointer for joystick drivers */
- void *driver; /* Private pointer for gameport drivers */
+ void *private; /* Private pointer for joystick drivers */
+ void *port_data; /* Private pointer for gameport drivers */
char *name;
char *phys;
diff -Nru a/sound/oss/trident.c b/sound/oss/trident.c
--- a/sound/oss/trident.c 2005-02-11 01:34:39 -05:00
+++ b/sound/oss/trident.c 2005-02-11 01:34:39 -05:00
@@ -4257,21 +4257,21 @@
static unsigned char
trident_game_read(struct gameport *gameport)
{
- struct trident_card *card = gameport->driver;
+ struct trident_card *card = gameport->port_data;
return inb(TRID_REG(card, T4D_GAME_LEG));
}
static void
trident_game_trigger(struct gameport *gameport)
{
- struct trident_card *card = gameport->driver;
+ struct trident_card *card = gameport->port_data;
outb(0xff, TRID_REG(card, T4D_GAME_LEG));
}
static int
trident_game_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
- struct trident_card *card = gameport->driver;
+ struct trident_card *card = gameport->port_data;
int i;
*buttons = (~inb(TRID_REG(card, T4D_GAME_LEG)) >> 4) & 0xf;
@@ -4288,7 +4288,7 @@
static int
trident_game_open(struct gameport *gameport, int mode)
{
- struct trident_card *card = gameport->driver;
+ struct trident_card *card = gameport->port_data;
switch (mode) {
case GAMEPORT_MODE_COOKED:
@@ -4368,7 +4368,7 @@
card->banks[BANK_B].addresses = &bank_b_addrs;
card->banks[BANK_B].bitmap = 0UL;
- card->gameport.driver = card;
+ card->gameport.port_data = card;
card->gameport.fuzz = 64;
card->gameport.read = trident_game_read;
card->gameport.trigger = trident_game_trigger;
diff -Nru a/sound/pci/au88x0/au88x0_game.c b/sound/pci/au88x0/au88x0_game.c
--- a/sound/pci/au88x0/au88x0_game.c 2005-02-11 01:34:39 -05:00
+++ b/sound/pci/au88x0/au88x0_game.c 2005-02-11 01:34:39 -05:00
@@ -44,20 +44,20 @@
static unsigned char vortex_game_read(struct gameport *gameport)
{
- vortex_t *vortex = gameport->driver;
+ vortex_t *vortex = gameport->port_data;
return hwread(vortex->mmio, VORTEX_GAME_LEGACY);
}
static void vortex_game_trigger(struct gameport *gameport)
{
- vortex_t *vortex = gameport->driver;
+ vortex_t *vortex = gameport->port_data;
hwwrite(vortex->mmio, VORTEX_GAME_LEGACY, 0xff);
}
static int
vortex_game_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
- vortex_t *vortex = gameport->driver;
+ vortex_t *vortex = gameport->port_data;
int i;
*buttons = (~hwread(vortex->mmio, VORTEX_GAME_LEGACY) >> 4) & 0xf;
@@ -73,7 +73,7 @@
static int vortex_game_open(struct gameport *gameport, int mode)
{
- vortex_t *vortex = gameport->driver;
+ vortex_t *vortex = gameport->port_data;
switch (mode) {
case GAMEPORT_MODE_COOKED:
@@ -96,11 +96,10 @@
static int vortex_gameport_register(vortex_t * vortex)
{
- if ((vortex->gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL)) == NULL) {
+ if ((vortex->gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL)) == NULL)
return -1;
- };
-
- vortex->gameport->driver = vortex;
+
+ vortex->gameport->port_data = vortex;
vortex->gameport->fuzz = 64;
vortex->gameport->read = vortex_game_read;
next prev parent reply other threads:[~2005-02-11 7:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-11 6:58 [PATCH 0/10] Convert gameport to driver model/sysfs Dmitry Torokhov
2005-02-11 6:58 ` Dmitry Torokhov
2005-02-11 6:59 ` Dmitry Torokhov [this message]
2005-02-11 6:59 ` [PATCH 1/10] Gameport: rename driver to port_data Dmitry Torokhov
2005-02-11 7:00 ` [PATCH 2/10] Gameport: rename gameport_dev to gameport_driver Dmitry Torokhov
2005-02-11 7:00 ` Dmitry Torokhov
2005-02-11 7:00 ` [PATCH 3/10] Gameport: connect() is mandatory Dmitry Torokhov
2005-02-11 7:00 ` Dmitry Torokhov
2005-02-11 7:01 ` [PATCH 4/10] Gameport: prepare to dynamic allocation Dmitry Torokhov
2005-02-11 7:01 ` Dmitry Torokhov
2005-02-11 7:02 ` [PATCH 5/10] Gameport: convert input/gameport " Dmitry Torokhov
2005-02-11 7:02 ` Dmitry Torokhov
2005-02-11 7:02 ` [PATCH 6/10] Gameport: convert sound/oss " Dmitry Torokhov
2005-02-11 7:02 ` Dmitry Torokhov
2005-02-11 7:03 ` [PATCH 7/10] Gameport: convert sound/alsa " Dmitry Torokhov
2005-02-11 7:03 ` Dmitry Torokhov
2005-02-11 7:04 ` [PATCH 8/10] Gameport: add "gameport" sysfs bus, add drivers Dmitry Torokhov
2005-02-11 7:04 ` Dmitry Torokhov
2005-02-11 7:04 ` [PATCH 9/10] Gameport: complete sysfs integration Dmitry Torokhov
2005-02-11 7:04 ` Dmitry Torokhov
2005-02-11 7:05 ` [PATCH 10/10] Gameport: replace ->private with gameport_get/set_drvdata Dmitry Torokhov
2005-02-11 7:05 ` Dmitry Torokhov
2005-02-11 8:11 ` [PATCH 0/10] Convert gameport to driver model/sysfs Vojtech Pavlik
2005-02-11 8:11 ` Vojtech Pavlik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200502110159.51020.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=alsa-devel@alsa-project.org \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.