* [PATCH 2.5 IrDA] tekram-sir driver fix
@ 2003-08-08 18:54 Jean Tourrilhes
0 siblings, 0 replies; only message in thread
From: Jean Tourrilhes @ 2003-08-08 18:54 UTC (permalink / raw)
To: Jeff Garzik, Linux kernel mailing list
ir260_tekram-sir.diff :
~~~~~~~~~~~~~~~~~~~~~
<Patch from Martin Diehl>
o [CORRECT] Update tekram-sir dongle driver to common power-settling
diff -u -p linux/drivers/net/irda/tekram-sir.d2.c linux/drivers/net/irda/tekram-sir.c
--- linux/drivers/net/irda/tekram-sir.d2.c Fri Aug 8 10:29:24 2003
+++ linux/drivers/net/irda/tekram-sir.c Fri Aug 8 10:32:46 2003
@@ -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) {
-
- 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;
-
- default:
- ERROR("%s - undefined state\n", __FUNCTION__);
- return -EINVAL;
- }
+ 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);
- dev->fsm.substate = next_state;
+ /* irda thread waits 50 msec for power settling */
- return delay;
+ return 0;
}
static int tekram_close(struct sir_dev *dev)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-08-08 19:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 18:54 [PATCH 2.5 IrDA] tekram-sir driver fix Jean Tourrilhes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).