patch-2.4.23 linux-2.4.23/net/irda/ircomm/ircomm_tty_attach.c
Next file: linux-2.4.23/net/irda/ircomm/ircomm_tty_ioctl.c
Previous file: linux-2.4.23/net/irda/ircomm/ircomm_ttp.c
Back to the patch index
Back to the overall index
- Lines: 321
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/net/irda/ircomm/ircomm_tty_attach.c
- Orig date:
2003-08-25 04:44:44.000000000 -0700
diff -urN linux-2.4.22/net/irda/ircomm/ircomm_tty_attach.c linux-2.4.23/net/irda/ircomm/ircomm_tty_attach.c
@@ -126,14 +126,14 @@
*/
int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
{
- IRDA_DEBUG(0, __FUNCTION__ "()\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
/* Check if somebody has already connected to us */
if (ircomm_is_connected(self->ircomm)) {
- IRDA_DEBUG(0, __FUNCTION__ "(), already connected!\n");
+ IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__);
return 0;
}
@@ -144,7 +144,7 @@
/* Check if somebody has already connected to us */
if (ircomm_is_connected(self->ircomm)) {
- IRDA_DEBUG(0, __FUNCTION__ "(), already connected!\n");
+ IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__);
return 0;
}
@@ -161,7 +161,7 @@
*/
void ircomm_tty_detach_cable(struct ircomm_tty_cb *self)
{
- IRDA_DEBUG(0, __FUNCTION__ "()\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -203,7 +203,7 @@
__u8 oct_seq[6];
__u16 hints;
- IRDA_DEBUG(0, __FUNCTION__ "()\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -258,16 +258,16 @@
* Set default values, but only if the application for some reason
* haven't set them already
*/
- IRDA_DEBUG(2, __FUNCTION__ "(), data-rate = %d\n",
+ IRDA_DEBUG(2, "%s(), data-rate = %d\n", __FUNCTION__,
self->settings.data_rate);
if (!self->settings.data_rate)
self->settings.data_rate = 9600;
- IRDA_DEBUG(2, __FUNCTION__ "(), data-format = %d\n",
+ IRDA_DEBUG(2, "%s(), data-format = %d\n", __FUNCTION__,
self->settings.data_format);
if (!self->settings.data_format)
self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */
- IRDA_DEBUG(2, __FUNCTION__ "(), flow-control = %d\n",
+ IRDA_DEBUG(2, "%s(), flow-control = %d\n", __FUNCTION__,
self->settings.flow_control);
/*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/
@@ -312,7 +312,7 @@
struct ircomm_tty_cb *self;
struct ircomm_tty_info info;
- IRDA_DEBUG(2, __FUNCTION__"()\n");
+ IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
/* Important note :
* We need to drop all passive discoveries.
@@ -354,7 +354,7 @@
{
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
- IRDA_DEBUG(2, __FUNCTION__ "()\n");
+ IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -384,7 +384,7 @@
{
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv;
- IRDA_DEBUG(2, __FUNCTION__"()\n");
+ IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -395,13 +395,13 @@
/* Check if request succeeded */
if (result != IAS_SUCCESS) {
- IRDA_DEBUG(4, __FUNCTION__ "(), got NULL value!\n");
+ IRDA_DEBUG(4, "%s(), got NULL value!\n", __FUNCTION__);
return;
}
switch (value->type) {
case IAS_OCT_SEQ:
- IRDA_DEBUG(2, __FUNCTION__"(), got octet sequence\n");
+ IRDA_DEBUG(2, "%s(), got octet sequence\n", __FUNCTION__);
irda_param_extract_all(self, value->t.oct_seq, value->len,
&ircomm_param_info);
@@ -411,21 +411,21 @@
break;
case IAS_INTEGER:
/* Got LSAP selector */
- IRDA_DEBUG(2, __FUNCTION__"(), got lsapsel = %d\n",
+ IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __FUNCTION__,
value->t.integer);
if (value->t.integer == -1) {
- IRDA_DEBUG(0, __FUNCTION__"(), invalid value!\n");
+ IRDA_DEBUG(0, "%s(), invalid value!\n", __FUNCTION__);
} else
self->dlsap_sel = value->t.integer;
ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL);
break;
case IAS_MISSING:
- IRDA_DEBUG(0, __FUNCTION__"(), got IAS_MISSING\n");
+ IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __FUNCTION__);
break;
default:
- IRDA_DEBUG(0, __FUNCTION__"(), got unknown type!\n");
+ IRDA_DEBUG(0, "%s(), got unknown type!\n", __FUNCTION__);
break;
}
irias_delete_value(value);
@@ -445,7 +445,7 @@
{
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
- IRDA_DEBUG(2, __FUNCTION__ "()\n");
+ IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -476,7 +476,7 @@
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
int clen;
- IRDA_DEBUG(2, __FUNCTION__ "()\n");
+ IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -505,7 +505,7 @@
*/
void ircomm_tty_link_established(struct ircomm_tty_cb *self)
{
- IRDA_DEBUG(2, __FUNCTION__ "()\n");
+ IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -580,7 +580,7 @@
{
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data;
- IRDA_DEBUG(2, __FUNCTION__ "()\n");
+ IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -601,7 +601,7 @@
{
int ret = 0;
- IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n",
+ IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__,
ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) {
case IRCOMM_TTY_ATTACH_CABLE:
@@ -616,8 +616,7 @@
self->saddr = info->saddr;
if (self->iriap) {
- WARNING(__FUNCTION__
- "(), busy with a previous query\n");
+ WARNING("%s(), busy with a previous query\n", __FUNCTION__);
return -EBUSY;
}
@@ -645,7 +644,7 @@
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break;
default:
- IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n",
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__,
ircomm_tty_event[event]);
return -EINVAL;
}
@@ -665,7 +664,7 @@
{
int ret = 0;
- IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n",
+ IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__,
ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) {
@@ -674,8 +673,7 @@
self->saddr = info->saddr;
if (self->iriap) {
- WARNING(__FUNCTION__
- "(), busy with a previous query\n");
+ WARNING("%s(), busy with a previous query\n", __FUNCTION__);
return -EBUSY;
}
@@ -717,7 +715,7 @@
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break;
default:
- IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n",
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__,
ircomm_tty_event[event]);
return -EINVAL;
}
@@ -737,14 +735,13 @@
{
int ret = 0;
- IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n",
+ IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__,
ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) {
case IRCOMM_TTY_GOT_PARAMETERS:
if (self->iriap) {
- WARNING(__FUNCTION__
- "(), busy with a previous query\n");
+ WARNING("%s(), busy with a previous query\n", __FUNCTION__);
return -EBUSY;
}
@@ -774,7 +771,7 @@
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break;
default:
- IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n",
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__,
ircomm_tty_event[event]);
return -EINVAL;
}
@@ -794,7 +791,7 @@
{
int ret = 0;
- IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n",
+ IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__,
ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) {
@@ -822,7 +819,7 @@
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break;
default:
- IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n",
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__,
ircomm_tty_event[event]);
return -EINVAL;
}
@@ -842,7 +839,7 @@
{
int ret = 0;
- IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n",
+ IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__,
ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) {
@@ -874,7 +871,7 @@
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break;
default:
- IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n",
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__,
ircomm_tty_event[event]);
return -EINVAL;
}
@@ -911,13 +908,13 @@
self->settings.dce = IRCOMM_DELTA_CD;
ircomm_tty_check_modem_status(self);
} else {
- IRDA_DEBUG(0, __FUNCTION__ "(), hanging up!\n");
+ IRDA_DEBUG(0, "%s(), hanging up!\n", __FUNCTION__);
if (self->tty)
tty_hangup(self->tty);
}
break;
default:
- IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n",
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__,
ircomm_tty_event[event]);
return -EINVAL;
}
@@ -936,7 +933,7 @@
ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
- IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n",
+ IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__,
ircomm_tty_state[self->state], ircomm_tty_event[event]);
return (*state[self->state])(self, event, skb, info);
@@ -955,7 +952,7 @@
self->state = state;
- IRDA_DEBUG(2, __FUNCTION__": next state=%s, service type=%d\n",
+ IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __FUNCTION__,
ircomm_tty_state[self->state], self->service_type);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)