Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Tourrilhes <jt@bougret.hpl.hp.com>2003-08-08 13:14:54 -0400
committerLinus Torvalds <torvalds@home.osdl.org>2003-08-08 13:14:54 -0400
commit6b67d197a354d44fe3f88ee70a5f320104ff1c0e (patch)
treecbc14a103e91926e2b945518b7ac9d861a36421a
parenta00848ccc40745fb9eed6a02e067f2fbc3fd0877 (diff)
[PATCH] tekram-sir driver fix
ir260_tekram-sir.diff : ~~~~~~~~~~~~~~~~~~~~~ <Patch from Martin Diehl> o [CORRECT] Update tekram-sir dongle driver to common power-settling
-rw-r--r--drivers/net/irda/tekram-sir.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/drivers/net/irda/tekram-sir.c b/drivers/net/irda/tekram-sir.c
index 8c326d30e5c7..a6574b82cfab 100644
--- a/drivers/net/irda/tekram-sir.c
+++ b/drivers/net/irda/tekram-sir.c
@@ -71,38 +71,20 @@ void __exit tekram_sir_cleanup(void)
irda_unregister_dongle(&tekram);
}
-#define TEKRAM_STATE_POWERED (SIRDEV_STATE_DONGLE_OPEN + 1)
-
static int tekram_open(struct sir_dev *dev)
{
- unsigned delay = 0;
- unsigned next_state = dev->fsm.substate;
struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
- switch(dev->fsm.substate) {
+ dev->set_dtr_rts(dev, TRUE, TRUE);
+ qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200;
+ qos->min_turn_time.bits = 0x01; /* Needs at least 10 ms */
+ irda_qos_bits_to_value(qos);
- case SIRDEV_STATE_DONGLE_OPEN:
- dev->set_dtr_rts(dev, TRUE, TRUE);
- next_state = TEKRAM_STATE_POWERED;
- delay = 50;
- break;
-
- case TEKRAM_STATE_POWERED:
- qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200;
- qos->min_turn_time.bits = 0x01; /* Needs at least 10 ms */
- irda_qos_bits_to_value(qos);
- return 0;
+ /* irda thread waits 50 msec for power settling */
- default:
- ERROR("%s - undefined state\n", __FUNCTION__);
- return -EINVAL;
- }
-
- dev->fsm.substate = next_state;
-
- return delay;
+ return 0;
}
static int tekram_close(struct sir_dev *dev)