lkml.org 
[lkml]   [2003]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 2.5 IrDA] tekram-sir driver fix
From
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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.051 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site