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 3/10] Gameport: connect() is mandatory
Date: Fri, 11 Feb 2005 02:00:59 -0500 [thread overview]
Message-ID: <200502110201.00916.dtor_core@ameritech.net> (raw)
In-Reply-To: <200502110200.28299.dtor_core@ameritech.net>
===================================================================
ChangeSet@1.2151, 2005-02-11 01:18:29-05:00, dtor_core@ameritech.net
Input: make connect and disconnect methods mandatory for gameport
drivers since that's where gameport_{open|close} are called
from to actually bind driver to a port.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
gameport.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
===================================================================
diff -Nru a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
--- a/drivers/input/gameport/gameport.c 2005-02-11 01:35:40 -05:00
+++ b/drivers/input/gameport/gameport.c 2005-02-11 01:35:40 -05:00
@@ -107,8 +107,7 @@
list_for_each_entry(drv, &gameport_driver_list, node) {
if (gameport->drv)
break;
- if (drv->connect)
- drv->connect(gameport, drv);
+ drv->connect(gameport, drv);
}
}
@@ -128,7 +127,7 @@
void gameport_unregister_port(struct gameport *gameport)
{
list_del_init(&gameport->node);
- if (gameport->drv && gameport->drv->disconnect)
+ if (gameport->drv)
gameport->drv->disconnect(gameport);
}
@@ -138,7 +137,7 @@
list_add_tail(&drv->node, &gameport_driver_list);
list_for_each_entry(gameport, &gameport_list, node)
- if (!gameport->drv && drv->connect)
+ if (!gameport->drv)
drv->connect(gameport, drv);
}
@@ -148,7 +147,7 @@
list_del_init(&drv->node);
list_for_each_entry(gameport, &gameport_list, node) {
- if (gameport->drv == drv && drv->disconnect)
+ if (gameport->drv == drv)
drv->disconnect(gameport);
gameport_find_driver(gameport);
}
-------------------------------------------------------
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 3/10] Gameport: connect() is mandatory
Date: Fri, 11 Feb 2005 02:00:59 -0500 [thread overview]
Message-ID: <200502110201.00916.dtor_core@ameritech.net> (raw)
In-Reply-To: <200502110200.28299.dtor_core@ameritech.net>
===================================================================
ChangeSet@1.2151, 2005-02-11 01:18:29-05:00, dtor_core@ameritech.net
Input: make connect and disconnect methods mandatory for gameport
drivers since that's where gameport_{open|close} are called
from to actually bind driver to a port.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
gameport.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
===================================================================
diff -Nru a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
--- a/drivers/input/gameport/gameport.c 2005-02-11 01:35:40 -05:00
+++ b/drivers/input/gameport/gameport.c 2005-02-11 01:35:40 -05:00
@@ -107,8 +107,7 @@
list_for_each_entry(drv, &gameport_driver_list, node) {
if (gameport->drv)
break;
- if (drv->connect)
- drv->connect(gameport, drv);
+ drv->connect(gameport, drv);
}
}
@@ -128,7 +127,7 @@
void gameport_unregister_port(struct gameport *gameport)
{
list_del_init(&gameport->node);
- if (gameport->drv && gameport->drv->disconnect)
+ if (gameport->drv)
gameport->drv->disconnect(gameport);
}
@@ -138,7 +137,7 @@
list_add_tail(&drv->node, &gameport_driver_list);
list_for_each_entry(gameport, &gameport_list, node)
- if (!gameport->drv && drv->connect)
+ if (!gameport->drv)
drv->connect(gameport, drv);
}
@@ -148,7 +147,7 @@
list_del_init(&drv->node);
list_for_each_entry(gameport, &gameport_list, node) {
- if (gameport->drv == drv && drv->disconnect)
+ if (gameport->drv == drv)
drv->disconnect(gameport);
gameport_find_driver(gameport);
}
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 ` [PATCH 1/10] Gameport: rename driver to port_data Dmitry Torokhov
2005-02-11 6:59 ` 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 ` Dmitry Torokhov [this message]
2005-02-11 7:00 ` [PATCH 3/10] Gameport: connect() is mandatory 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=200502110201.00916.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.