Commit a97a6f10 authored by Harvey Harrison's avatar Harvey Harrison Committed by David S. Miller

irda: replace __FUNCTION__ with __func__

__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1fa98174
...@@ -107,7 +107,7 @@ static int act200l_open(struct sir_dev *dev) ...@@ -107,7 +107,7 @@ static int act200l_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Power on the dongle */ /* Power on the dongle */
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -124,7 +124,7 @@ static int act200l_open(struct sir_dev *dev) ...@@ -124,7 +124,7 @@ static int act200l_open(struct sir_dev *dev)
static int act200l_close(struct sir_dev *dev) static int act200l_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Power off the dongle */ /* Power off the dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -143,7 +143,7 @@ static int act200l_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -143,7 +143,7 @@ static int act200l_change_speed(struct sir_dev *dev, unsigned speed)
u8 control[3]; u8 control[3];
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Clear DTR and set RTS to enter command mode */ /* Clear DTR and set RTS to enter command mode */
sirdev_set_dtr_rts(dev, FALSE, TRUE); sirdev_set_dtr_rts(dev, FALSE, TRUE);
...@@ -212,7 +212,7 @@ static int act200l_reset(struct sir_dev *dev) ...@@ -212,7 +212,7 @@ static int act200l_reset(struct sir_dev *dev)
}; };
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
switch (state) { switch (state) {
case SIRDEV_STATE_DONGLE_RESET: case SIRDEV_STATE_DONGLE_RESET:
...@@ -240,7 +240,7 @@ static int act200l_reset(struct sir_dev *dev) ...@@ -240,7 +240,7 @@ static int act200l_reset(struct sir_dev *dev)
dev->speed = 9600; dev->speed = 9600;
break; break;
default: default:
IRDA_ERROR("%s(), unknown state %d\n", __FUNCTION__, state); IRDA_ERROR("%s(), unknown state %d\n", __func__, state);
ret = -1; ret = -1;
break; break;
} }
......
...@@ -165,7 +165,7 @@ static int actisys_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -165,7 +165,7 @@ static int actisys_change_speed(struct sir_dev *dev, unsigned speed)
int ret = 0; int ret = 0;
int i = 0; int i = 0;
IRDA_DEBUG(4, "%s(), speed=%d (was %d)\n", __FUNCTION__, IRDA_DEBUG(4, "%s(), speed=%d (was %d)\n", __func__,
speed, dev->speed); speed, dev->speed);
/* dongle was already resetted from irda_request state machine, /* dongle was already resetted from irda_request state machine,
......
This diff is collapsed.
This diff is collapsed.
...@@ -86,7 +86,7 @@ static int girbil_open(struct sir_dev *dev) ...@@ -86,7 +86,7 @@ static int girbil_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Power on dongle */ /* Power on dongle */
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -102,7 +102,7 @@ static int girbil_open(struct sir_dev *dev) ...@@ -102,7 +102,7 @@ static int girbil_open(struct sir_dev *dev)
static int girbil_close(struct sir_dev *dev) static int girbil_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -126,7 +126,7 @@ static int girbil_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -126,7 +126,7 @@ static int girbil_change_speed(struct sir_dev *dev, unsigned speed)
u8 control[2]; u8 control[2];
static int ret = 0; static int ret = 0;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* dongle alread reset - port and dongle at default speed */ /* dongle alread reset - port and dongle at default speed */
...@@ -179,7 +179,7 @@ static int girbil_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -179,7 +179,7 @@ static int girbil_change_speed(struct sir_dev *dev, unsigned speed)
break; break;
default: default:
IRDA_ERROR("%s - undefined state %d\n", __FUNCTION__, state); IRDA_ERROR("%s - undefined state %d\n", __func__, state);
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
...@@ -209,7 +209,7 @@ static int girbil_reset(struct sir_dev *dev) ...@@ -209,7 +209,7 @@ static int girbil_reset(struct sir_dev *dev)
u8 control = GIRBIL_TXEN | GIRBIL_RXEN; u8 control = GIRBIL_TXEN | GIRBIL_RXEN;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
switch (state) { switch (state) {
case SIRDEV_STATE_DONGLE_RESET: case SIRDEV_STATE_DONGLE_RESET:
...@@ -241,7 +241,7 @@ static int girbil_reset(struct sir_dev *dev) ...@@ -241,7 +241,7 @@ static int girbil_reset(struct sir_dev *dev)
break; break;
default: default:
IRDA_ERROR("%s(), undefined state %d\n", __FUNCTION__, state); IRDA_ERROR("%s(), undefined state %d\n", __func__, state);
ret = -1; ret = -1;
break; break;
} }
......
This diff is collapsed.
...@@ -231,7 +231,7 @@ static void irtty_receive_buf(struct tty_struct *tty, const unsigned char *cp, ...@@ -231,7 +231,7 @@ static void irtty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
dev = priv->dev; dev = priv->dev;
if (!dev) { if (!dev) {
IRDA_WARNING("%s(), not ready yet!\n", __FUNCTION__); IRDA_WARNING("%s(), not ready yet!\n", __func__);
return; return;
} }
...@@ -388,7 +388,7 @@ static int irtty_ioctl(struct tty_struct *tty, struct file *file, unsigned int c ...@@ -388,7 +388,7 @@ static int irtty_ioctl(struct tty_struct *tty, struct file *file, unsigned int c
IRDA_ASSERT(priv != NULL, return -ENODEV;); IRDA_ASSERT(priv != NULL, return -ENODEV;);
IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -EBADR;); IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -EBADR;);
IRDA_DEBUG(3, "%s(cmd=0x%X)\n", __FUNCTION__, cmd); IRDA_DEBUG(3, "%s(cmd=0x%X)\n", __func__, cmd);
dev = priv->dev; dev = priv->dev;
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
...@@ -476,7 +476,7 @@ static int irtty_open(struct tty_struct *tty) ...@@ -476,7 +476,7 @@ static int irtty_open(struct tty_struct *tty)
mutex_unlock(&irtty_mutex); mutex_unlock(&irtty_mutex);
IRDA_DEBUG(0, "%s - %s: irda line discipline opened\n", __FUNCTION__, tty->name); IRDA_DEBUG(0, "%s - %s: irda line discipline opened\n", __func__, tty->name);
return 0; return 0;
...@@ -528,7 +528,7 @@ static void irtty_close(struct tty_struct *tty) ...@@ -528,7 +528,7 @@ static void irtty_close(struct tty_struct *tty)
kfree(priv); kfree(priv);
IRDA_DEBUG(0, "%s - %s: irda line discipline closed\n", __FUNCTION__, tty->name); IRDA_DEBUG(0, "%s - %s: irda line discipline closed\n", __func__, tty->name);
} }
/* ------------------------------------------------------- */ /* ------------------------------------------------------- */
...@@ -566,7 +566,7 @@ static void __exit irtty_sir_cleanup(void) ...@@ -566,7 +566,7 @@ static void __exit irtty_sir_cleanup(void)
if ((err = tty_unregister_ldisc(N_IRDA))) { if ((err = tty_unregister_ldisc(N_IRDA))) {
IRDA_ERROR("%s(), can't unregister line discipline (err = %d)\n", IRDA_ERROR("%s(), can't unregister line discipline (err = %d)\n",
__FUNCTION__, err); __func__, err);
} }
} }
......
...@@ -243,7 +243,7 @@ static void kingsun_rcv_irq(struct urb *urb) ...@@ -243,7 +243,7 @@ static void kingsun_rcv_irq(struct urb *urb)
} }
} else if (urb->actual_length > 0) { } else if (urb->actual_length > 0) {
err("%s(): Unexpected response length, expected %d got %d", err("%s(): Unexpected response length, expected %d got %d",
__FUNCTION__, kingsun->max_rx, urb->actual_length); __func__, kingsun->max_rx, urb->actual_length);
} }
/* This urb has already been filled in kingsun_net_open */ /* This urb has already been filled in kingsun_net_open */
ret = usb_submit_urb(urb, GFP_ATOMIC); ret = usb_submit_urb(urb, GFP_ATOMIC);
......
...@@ -78,7 +78,7 @@ static int litelink_open(struct sir_dev *dev) ...@@ -78,7 +78,7 @@ static int litelink_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Power up dongle */ /* Power up dongle */
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -95,7 +95,7 @@ static int litelink_open(struct sir_dev *dev) ...@@ -95,7 +95,7 @@ static int litelink_open(struct sir_dev *dev)
static int litelink_close(struct sir_dev *dev) static int litelink_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -113,7 +113,7 @@ static int litelink_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -113,7 +113,7 @@ static int litelink_change_speed(struct sir_dev *dev, unsigned speed)
{ {
int i; int i;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* dongle already reset by irda-thread - current speed (dongle and /* dongle already reset by irda-thread - current speed (dongle and
* port) is the default speed (115200 for litelink!) * port) is the default speed (115200 for litelink!)
...@@ -156,7 +156,7 @@ static int litelink_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -156,7 +156,7 @@ static int litelink_change_speed(struct sir_dev *dev, unsigned speed)
*/ */
static int litelink_reset(struct sir_dev *dev) static int litelink_reset(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* probably the power-up can be dropped here, but with only /* probably the power-up can be dropped here, but with only
* 15 usec delay it's not worth the risk unless somebody with * 15 usec delay it's not worth the risk unless somebody with
......
...@@ -67,13 +67,13 @@ static struct dongle_driver ma600 = { ...@@ -67,13 +67,13 @@ static struct dongle_driver ma600 = {
static int __init ma600_sir_init(void) static int __init ma600_sir_init(void)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
return irda_register_dongle(&ma600); return irda_register_dongle(&ma600);
} }
static void __exit ma600_sir_cleanup(void) static void __exit ma600_sir_cleanup(void)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
irda_unregister_dongle(&ma600); irda_unregister_dongle(&ma600);
} }
...@@ -88,7 +88,7 @@ static int ma600_open(struct sir_dev *dev) ...@@ -88,7 +88,7 @@ static int ma600_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -106,7 +106,7 @@ static int ma600_open(struct sir_dev *dev) ...@@ -106,7 +106,7 @@ static int ma600_open(struct sir_dev *dev)
static int ma600_close(struct sir_dev *dev) static int ma600_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -176,7 +176,7 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -176,7 +176,7 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
{ {
u8 byte; u8 byte;
IRDA_DEBUG(2, "%s(), speed=%d (was %d)\n", __FUNCTION__, IRDA_DEBUG(2, "%s(), speed=%d (was %d)\n", __func__,
speed, dev->speed); speed, dev->speed);
/* dongle already reset, dongle and port at default speed (9600) */ /* dongle already reset, dongle and port at default speed (9600) */
...@@ -201,12 +201,12 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -201,12 +201,12 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
sirdev_raw_read(dev, &byte, sizeof(byte)); sirdev_raw_read(dev, &byte, sizeof(byte));
if (byte != get_control_byte(speed)) { if (byte != get_control_byte(speed)) {
IRDA_WARNING("%s(): bad control byte read-back %02x != %02x\n", IRDA_WARNING("%s(): bad control byte read-back %02x != %02x\n",
__FUNCTION__, (unsigned) byte, __func__, (unsigned) byte,
(unsigned) get_control_byte(speed)); (unsigned) get_control_byte(speed));
return -1; return -1;
} }
else else
IRDA_DEBUG(2, "%s() control byte write read OK\n", __FUNCTION__); IRDA_DEBUG(2, "%s() control byte write read OK\n", __func__);
#endif #endif
/* Set DTR, Set RTS */ /* Set DTR, Set RTS */
...@@ -238,7 +238,7 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -238,7 +238,7 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
int ma600_reset(struct sir_dev *dev) int ma600_reset(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Reset the dongle : set DTR low for 10 ms */ /* Reset the dongle : set DTR low for 10 ms */
sirdev_set_dtr_rts(dev, FALSE, TRUE); sirdev_set_dtr_rts(dev, FALSE, TRUE);
......
...@@ -63,7 +63,7 @@ static int mcp2120_open(struct sir_dev *dev) ...@@ -63,7 +63,7 @@ static int mcp2120_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* seems no explicit power-on required here and reset switching it on anyway */ /* seems no explicit power-on required here and reset switching it on anyway */
...@@ -76,7 +76,7 @@ static int mcp2120_open(struct sir_dev *dev) ...@@ -76,7 +76,7 @@ static int mcp2120_open(struct sir_dev *dev)
static int mcp2120_close(struct sir_dev *dev) static int mcp2120_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
/* reset and inhibit mcp2120 */ /* reset and inhibit mcp2120 */
...@@ -102,7 +102,7 @@ static int mcp2120_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -102,7 +102,7 @@ static int mcp2120_change_speed(struct sir_dev *dev, unsigned speed)
u8 control[2]; u8 control[2];
static int ret = 0; static int ret = 0;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
switch (state) { switch (state) {
case SIRDEV_STATE_DONGLE_SPEED: case SIRDEV_STATE_DONGLE_SPEED:
...@@ -155,7 +155,7 @@ static int mcp2120_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -155,7 +155,7 @@ static int mcp2120_change_speed(struct sir_dev *dev, unsigned speed)
break; break;
default: default:
IRDA_ERROR("%s(), undefine state %d\n", __FUNCTION__, state); IRDA_ERROR("%s(), undefine state %d\n", __func__, state);
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
...@@ -187,7 +187,7 @@ static int mcp2120_reset(struct sir_dev *dev) ...@@ -187,7 +187,7 @@ static int mcp2120_reset(struct sir_dev *dev)
unsigned delay = 0; unsigned delay = 0;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
switch (state) { switch (state) {
case SIRDEV_STATE_DONGLE_RESET: case SIRDEV_STATE_DONGLE_RESET:
...@@ -213,7 +213,7 @@ static int mcp2120_reset(struct sir_dev *dev) ...@@ -213,7 +213,7 @@ static int mcp2120_reset(struct sir_dev *dev)
break; break;
default: default:
IRDA_ERROR("%s(), undefined state %d\n", __FUNCTION__, state); IRDA_ERROR("%s(), undefined state %d\n", __func__, state);
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
......
This diff is collapsed.
...@@ -92,7 +92,7 @@ static int old_belkin_open(struct sir_dev *dev) ...@@ -92,7 +92,7 @@ static int old_belkin_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Power on dongle */ /* Power on dongle */
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -110,7 +110,7 @@ static int old_belkin_open(struct sir_dev *dev) ...@@ -110,7 +110,7 @@ static int old_belkin_open(struct sir_dev *dev)
static int old_belkin_close(struct sir_dev *dev) static int old_belkin_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -125,7 +125,7 @@ static int old_belkin_close(struct sir_dev *dev) ...@@ -125,7 +125,7 @@ static int old_belkin_close(struct sir_dev *dev)
*/ */
static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed) static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
dev->speed = 9600; dev->speed = 9600;
return (speed==dev->speed) ? 0 : -EINVAL; return (speed==dev->speed) ? 0 : -EINVAL;
...@@ -139,7 +139,7 @@ static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -139,7 +139,7 @@ static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed)
*/ */
static int old_belkin_reset(struct sir_dev *dev) static int old_belkin_reset(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* This dongles speed "defaults" to 9600 bps ;-) */ /* This dongles speed "defaults" to 9600 bps ;-) */
dev->speed = 9600; dev->speed = 9600;
......
...@@ -80,7 +80,7 @@ static int sirdev_tx_complete_fsm(struct sir_dev *dev) ...@@ -80,7 +80,7 @@ static int sirdev_tx_complete_fsm(struct sir_dev *dev)
return 0; return 0;
default: default:
IRDA_ERROR("%s - undefined state\n", __FUNCTION__); IRDA_ERROR("%s - undefined state\n", __func__);
return -EINVAL; return -EINVAL;
} }
fsm->substate = next_state; fsm->substate = next_state;
...@@ -107,11 +107,11 @@ static void sirdev_config_fsm(struct work_struct *work) ...@@ -107,11 +107,11 @@ static void sirdev_config_fsm(struct work_struct *work)
int ret = -1; int ret = -1;
unsigned delay; unsigned delay;
IRDA_DEBUG(2, "%s(), <%ld>\n", __FUNCTION__, jiffies); IRDA_DEBUG(2, "%s(), <%ld>\n", __func__, jiffies);
do { do {
IRDA_DEBUG(3, "%s - state=0x%04x / substate=0x%04x\n", IRDA_DEBUG(3, "%s - state=0x%04x / substate=0x%04x\n",
__FUNCTION__, fsm->state, fsm->substate); __func__, fsm->state, fsm->substate);
next_state = fsm->state; next_state = fsm->state;
delay = 0; delay = 0;
...@@ -249,12 +249,12 @@ static void sirdev_config_fsm(struct work_struct *work) ...@@ -249,12 +249,12 @@ static void sirdev_config_fsm(struct work_struct *work)
break; break;
default: default:
IRDA_ERROR("%s - undefined state\n", __FUNCTION__); IRDA_ERROR("%s - undefined state\n", __func__);
fsm->result = -EINVAL; fsm->result = -EINVAL;
/* fall thru */ /* fall thru */
case SIRDEV_STATE_ERROR: case SIRDEV_STATE_ERROR:
IRDA_ERROR("%s - error: %d\n", __FUNCTION__, fsm->result); IRDA_ERROR("%s - error: %d\n", __func__, fsm->result);
#if 0 /* don't enable this before we have netdev->tx_timeout to recover */ #if 0 /* don't enable this before we have netdev->tx_timeout to recover */
netif_stop_queue(dev->netdev); netif_stop_queue(dev->netdev);
...@@ -284,11 +284,12 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par ...@@ -284,11 +284,12 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par
{ {
struct sir_fsm *fsm = &dev->fsm; struct sir_fsm *fsm = &dev->fsm;
IRDA_DEBUG(2, "%s - state=0x%04x / param=%u\n", __FUNCTION__, initial_state, param); IRDA_DEBUG(2, "%s - state=0x%04x / param=%u\n", __func__,
initial_state, param);
if (down_trylock(&fsm->sem)) { if (down_trylock(&fsm->sem)) {
if (in_interrupt() || in_atomic() || irqs_disabled()) { if (in_interrupt() || in_atomic() || irqs_disabled()) {
IRDA_DEBUG(1, "%s(), state machine busy!\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), state machine busy!\n", __func__);
return -EWOULDBLOCK; return -EWOULDBLOCK;
} else } else
down(&fsm->sem); down(&fsm->sem);
...@@ -296,7 +297,7 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par ...@@ -296,7 +297,7 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par
if (fsm->state == SIRDEV_STATE_DEAD) { if (fsm->state == SIRDEV_STATE_DEAD) {
/* race with sirdev_close should never happen */ /* race with sirdev_close should never happen */
IRDA_ERROR("%s(), instance staled!\n", __FUNCTION__); IRDA_ERROR("%s(), instance staled!\n", __func__);
up(&fsm->sem); up(&fsm->sem);
return -ESTALE; /* or better EPIPE? */ return -ESTALE; /* or better EPIPE? */
} }
...@@ -341,7 +342,7 @@ int sirdev_set_dongle(struct sir_dev *dev, IRDA_DONGLE type) ...@@ -341,7 +342,7 @@ int sirdev_set_dongle(struct sir_dev *dev, IRDA_DONGLE type)
{ {
int err; int err;
IRDA_DEBUG(3, "%s : requesting dongle %d.\n", __FUNCTION__, type); IRDA_DEBUG(3, "%s : requesting dongle %d.\n", __func__, type);
err = sirdev_schedule_dongle_open(dev, type); err = sirdev_schedule_dongle_open(dev, type);
if (unlikely(err)) if (unlikely(err))
...@@ -376,7 +377,7 @@ int sirdev_raw_write(struct sir_dev *dev, const char *buf, int len) ...@@ -376,7 +377,7 @@ int sirdev_raw_write(struct sir_dev *dev, const char *buf, int len)
ret = dev->drv->do_write(dev, dev->tx_buff.data, dev->tx_buff.len); ret = dev->drv->do_write(dev, dev->tx_buff.data, dev->tx_buff.len);
if (ret > 0) { if (ret > 0) {
IRDA_DEBUG(3, "%s(), raw-tx started\n", __FUNCTION__); IRDA_DEBUG(3, "%s(), raw-tx started\n", __func__);
dev->tx_buff.data += ret; dev->tx_buff.data += ret;
dev->tx_buff.len -= ret; dev->tx_buff.len -= ret;
...@@ -437,7 +438,7 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -437,7 +438,7 @@ void sirdev_write_complete(struct sir_dev *dev)
spin_lock_irqsave(&dev->tx_lock, flags); spin_lock_irqsave(&dev->tx_lock, flags);
IRDA_DEBUG(3, "%s() - dev->tx_buff.len = %d\n", IRDA_DEBUG(3, "%s() - dev->tx_buff.len = %d\n",
__FUNCTION__, dev->tx_buff.len); __func__, dev->tx_buff.len);
if (likely(dev->tx_buff.len > 0)) { if (likely(dev->tx_buff.len > 0)) {
/* Write data left in transmit buffer */ /* Write data left in transmit buffer */
...@@ -450,7 +451,7 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -450,7 +451,7 @@ void sirdev_write_complete(struct sir_dev *dev)
else if (unlikely(actual<0)) { else if (unlikely(actual<0)) {
/* could be dropped later when we have tx_timeout to recover */ /* could be dropped later when we have tx_timeout to recover */
IRDA_ERROR("%s: drv->do_write failed (%d)\n", IRDA_ERROR("%s: drv->do_write failed (%d)\n",
__FUNCTION__, actual); __func__, actual);
if ((skb=dev->tx_skb) != NULL) { if ((skb=dev->tx_skb) != NULL) {
dev->tx_skb = NULL; dev->tx_skb = NULL;
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
...@@ -471,7 +472,7 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -471,7 +472,7 @@ void sirdev_write_complete(struct sir_dev *dev)
* restarted when the irda-thread has completed the request. * restarted when the irda-thread has completed the request.
*/ */
IRDA_DEBUG(3, "%s(), raw-tx done\n", __FUNCTION__); IRDA_DEBUG(3, "%s(), raw-tx done\n", __func__);
dev->raw_tx = 0; dev->raw_tx = 0;
goto done; /* no post-frame handling in raw mode */ goto done; /* no post-frame handling in raw mode */
} }
...@@ -488,7 +489,7 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -488,7 +489,7 @@ void sirdev_write_complete(struct sir_dev *dev)
* re-activated. * re-activated.
*/ */
IRDA_DEBUG(5, "%s(), finished with frame!\n", __FUNCTION__); IRDA_DEBUG(5, "%s(), finished with frame!\n", __func__);
if ((skb=dev->tx_skb) != NULL) { if ((skb=dev->tx_skb) != NULL) {
dev->tx_skb = NULL; dev->tx_skb = NULL;
...@@ -498,14 +499,14 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -498,14 +499,14 @@ void sirdev_write_complete(struct sir_dev *dev)
} }
if (unlikely(dev->new_speed > 0)) { if (unlikely(dev->new_speed > 0)) {
IRDA_DEBUG(5, "%s(), Changing speed!\n", __FUNCTION__); IRDA_DEBUG(5, "%s(), Changing speed!\n", __func__);
err = sirdev_schedule_speed(dev, dev->new_speed); err = sirdev_schedule_speed(dev, dev->new_speed);
if (unlikely(err)) { if (unlikely(err)) {
/* should never happen /* should never happen
* forget the speed change and hope the stack recovers * forget the speed change and hope the stack recovers
*/ */
IRDA_ERROR("%s - schedule speed change failed: %d\n", IRDA_ERROR("%s - schedule speed change failed: %d\n",
__FUNCTION__, err); __func__, err);
netif_wake_queue(dev->netdev); netif_wake_queue(dev->netdev);
} }
/* else: success /* else: success
...@@ -532,13 +533,13 @@ EXPORT_SYMBOL(sirdev_write_complete); ...@@ -532,13 +533,13 @@ EXPORT_SYMBOL(sirdev_write_complete);
int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count) int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count)
{ {
if (!dev || !dev->netdev) { if (!dev || !dev->netdev) {
IRDA_WARNING("%s(), not ready yet!\n", __FUNCTION__); IRDA_WARNING("%s(), not ready yet!\n", __func__);
return -1; return -1;
} }
if (!dev->irlap) { if (!dev->irlap) {
IRDA_WARNING("%s - too early: %p / %zd!\n", IRDA_WARNING("%s - too early: %p / %zd!\n",
__FUNCTION__, cp, count); __func__, cp, count);
return -1; return -1;
} }
...@@ -548,7 +549,7 @@ int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count) ...@@ -548,7 +549,7 @@ int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count)
*/ */
irda_device_set_media_busy(dev->netdev, TRUE); irda_device_set_media_busy(dev->netdev, TRUE);
dev->stats.rx_dropped++; dev->stats.rx_dropped++;
IRDA_DEBUG(0, "%s; rx-drop: %zd\n", __FUNCTION__, count); IRDA_DEBUG(0, "%s; rx-drop: %zd\n", __func__, count);
return 0; return 0;
} }
...@@ -600,7 +601,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev) ...@@ -600,7 +601,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
netif_stop_queue(ndev); netif_stop_queue(ndev);
IRDA_DEBUG(3, "%s(), skb->len = %d\n", __FUNCTION__, skb->len); IRDA_DEBUG(3, "%s(), skb->len = %d\n", __func__, skb->len);
speed = irda_get_next_speed(skb); speed = irda_get_next_speed(skb);
if ((speed != dev->speed) && (speed != -1)) { if ((speed != dev->speed) && (speed != -1)) {
...@@ -637,7 +638,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev) ...@@ -637,7 +638,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
/* Check problems */ /* Check problems */
if(spin_is_locked(&dev->tx_lock)) { if(spin_is_locked(&dev->tx_lock)) {
IRDA_DEBUG(3, "%s(), write not completed\n", __FUNCTION__); IRDA_DEBUG(3, "%s(), write not completed\n", __func__);
} }
/* serialize with write completion */ /* serialize with write completion */
...@@ -666,7 +667,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev) ...@@ -666,7 +667,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
else if (unlikely(actual < 0)) { else if (unlikely(actual < 0)) {
/* could be dropped later when we have tx_timeout to recover */ /* could be dropped later when we have tx_timeout to recover */
IRDA_ERROR("%s: drv->do_write failed (%d)\n", IRDA_ERROR("%s: drv->do_write failed (%d)\n",
__FUNCTION__, actual); __func__, actual);
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
dev->stats.tx_errors++; dev->stats.tx_errors++;
dev->stats.tx_dropped++; dev->stats.tx_dropped++;
...@@ -687,7 +688,7 @@ static int sirdev_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) ...@@ -687,7 +688,7 @@ static int sirdev_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
IRDA_DEBUG(3, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__, ndev->name, cmd); IRDA_DEBUG(3, "%s(), %s, (cmd=0x%X)\n", __func__, ndev->name, cmd);
switch (cmd) { switch (cmd) {
case SIOCSBANDWIDTH: /* Set bandwidth */ case SIOCSBANDWIDTH: /* Set bandwidth */
...@@ -804,7 +805,7 @@ static int sirdev_open(struct net_device *ndev) ...@@ -804,7 +805,7 @@ static int sirdev_open(struct net_device *ndev)
if (!try_module_get(drv->owner)) if (!try_module_get(drv->owner))
return -ESTALE; return -ESTALE;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
if (sirdev_alloc_buffers(dev)) if (sirdev_alloc_buffers(dev))
goto errout_dec; goto errout_dec;
...@@ -822,7 +823,7 @@ static int sirdev_open(struct net_device *ndev) ...@@ -822,7 +823,7 @@ static int sirdev_open(struct net_device *ndev)
netif_wake_queue(ndev); netif_wake_queue(ndev);
IRDA_DEBUG(2, "%s - done, speed = %d\n", __FUNCTION__, dev->speed); IRDA_DEBUG(2, "%s - done, speed = %d\n", __func__, dev->speed);
return 0; return 0;
...@@ -842,7 +843,7 @@ static int sirdev_close(struct net_device *ndev) ...@@ -842,7 +843,7 @@ static int sirdev_close(struct net_device *ndev)
struct sir_dev *dev = ndev->priv; struct sir_dev *dev = ndev->priv;
const struct sir_driver *drv; const struct sir_driver *drv;
// IRDA_DEBUG(0, "%s\n", __FUNCTION__); // IRDA_DEBUG(0, "%s\n", __func__);
netif_stop_queue(ndev); netif_stop_queue(ndev);
...@@ -878,7 +879,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n ...@@ -878,7 +879,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n
struct net_device *ndev; struct net_device *ndev;
struct sir_dev *dev; struct sir_dev *dev;
IRDA_DEBUG(0, "%s - %s\n", __FUNCTION__, name); IRDA_DEBUG(0, "%s - %s\n", __func__, name);
/* instead of adding tests to protect against drv->do_write==NULL /* instead of adding tests to protect against drv->do_write==NULL
* at several places we refuse to create a sir_dev instance for * at several places we refuse to create a sir_dev instance for
...@@ -892,7 +893,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n ...@@ -892,7 +893,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n
*/ */
ndev = alloc_irdadev(sizeof(*dev)); ndev = alloc_irdadev(sizeof(*dev));
if (ndev == NULL) { if (ndev == NULL) {
IRDA_ERROR("%s - Can't allocate memory for IrDA control block!\n", __FUNCTION__); IRDA_ERROR("%s - Can't allocate memory for IrDA control block!\n", __func__);
goto out; goto out;
} }
dev = ndev->priv; dev = ndev->priv;
...@@ -921,7 +922,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n ...@@ -921,7 +922,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n
ndev->do_ioctl = sirdev_ioctl; ndev->do_ioctl = sirdev_ioctl;
if (register_netdev(ndev)) { if (register_netdev(ndev)) {
IRDA_ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); IRDA_ERROR("%s(), register_netdev() failed!\n", __func__);
goto out_freenetdev; goto out_freenetdev;
} }
...@@ -938,7 +939,7 @@ int sirdev_put_instance(struct sir_dev *dev) ...@@ -938,7 +939,7 @@ int sirdev_put_instance(struct sir_dev *dev)
{ {
int err = 0; int err = 0;
IRDA_DEBUG(0, "%s\n", __FUNCTION__); IRDA_DEBUG(0, "%s\n", __func__);
atomic_set(&dev->enable_rx, 0); atomic_set(&dev->enable_rx, 0);
...@@ -948,7 +949,7 @@ int sirdev_put_instance(struct sir_dev *dev) ...@@ -948,7 +949,7 @@ int sirdev_put_instance(struct sir_dev *dev)
if (dev->dongle_drv) if (dev->dongle_drv)
err = sirdev_schedule_dongle_close(dev); err = sirdev_schedule_dongle_close(dev);
if (err) if (err)
IRDA_ERROR("%s - error %d\n", __FUNCTION__, err); IRDA_ERROR("%s - error %d\n", __func__, err);
sirdev_close(dev->netdev); sirdev_close(dev->netdev);
......
...@@ -36,7 +36,7 @@ int irda_register_dongle(struct dongle_driver *new) ...@@ -36,7 +36,7 @@ int irda_register_dongle(struct dongle_driver *new)
struct dongle_driver *drv; struct dongle_driver *drv;
IRDA_DEBUG(0, "%s : registering dongle \"%s\" (%d).\n", IRDA_DEBUG(0, "%s : registering dongle \"%s\" (%d).\n",
__FUNCTION__, new->driver_name, new->type); __func__, new->driver_name, new->type);
mutex_lock(&dongle_list_lock); mutex_lock(&dongle_list_lock);
list_for_each(entry, &dongle_list) { list_for_each(entry, &dongle_list) {
......
This diff is collapsed.
...@@ -77,7 +77,7 @@ static int tekram_open(struct sir_dev *dev) ...@@ -77,7 +77,7 @@ static int tekram_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -92,7 +92,7 @@ static int tekram_open(struct sir_dev *dev) ...@@ -92,7 +92,7 @@ static int tekram_open(struct sir_dev *dev)
static int tekram_close(struct sir_dev *dev) static int tekram_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -130,7 +130,7 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -130,7 +130,7 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed)
u8 byte; u8 byte;
static int ret = 0; static int ret = 0;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
switch(state) { switch(state) {
case SIRDEV_STATE_DONGLE_SPEED: case SIRDEV_STATE_DONGLE_SPEED:
...@@ -179,7 +179,7 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -179,7 +179,7 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed)
break; break;
default: default:
IRDA_ERROR("%s - undefined state %d\n", __FUNCTION__, state); IRDA_ERROR("%s - undefined state %d\n", __func__, state);
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
...@@ -204,7 +204,7 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -204,7 +204,7 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed)
static int tekram_reset(struct sir_dev *dev) static int tekram_reset(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Clear DTR, Set RTS */ /* Clear DTR, Set RTS */
sirdev_set_dtr_rts(dev, FALSE, TRUE); sirdev_set_dtr_rts(dev, FALSE, TRUE);
......
...@@ -181,7 +181,7 @@ static int toim3232_open(struct sir_dev *dev) ...@@ -181,7 +181,7 @@ static int toim3232_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Pull the lines high to start with. /* Pull the lines high to start with.
* *
...@@ -209,7 +209,7 @@ static int toim3232_open(struct sir_dev *dev) ...@@ -209,7 +209,7 @@ static int toim3232_open(struct sir_dev *dev)
static int toim3232_close(struct sir_dev *dev) static int toim3232_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -241,7 +241,7 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -241,7 +241,7 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed)
u8 byte; u8 byte;
static int ret = 0; static int ret = 0;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
switch(state) { switch(state) {
case SIRDEV_STATE_DONGLE_SPEED: case SIRDEV_STATE_DONGLE_SPEED:
...@@ -299,7 +299,7 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -299,7 +299,7 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed)
break; break;
default: default:
printk(KERN_ERR "%s - undefined state %d\n", __FUNCTION__, state); printk(KERN_ERR "%s - undefined state %d\n", __func__, state);
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
...@@ -344,7 +344,7 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -344,7 +344,7 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed)
static int toim3232_reset(struct sir_dev *dev) static int toim3232_reset(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
/* Switch off both DTR and RTS to switch off dongle */ /* Switch off both DTR and RTS to switch off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
......
This diff is collapsed.
This diff is collapsed.
...@@ -617,7 +617,7 @@ static inline void rd_set_addr_status(struct ring_descr *rd, dma_addr_t a, u8 s) ...@@ -617,7 +617,7 @@ static inline void rd_set_addr_status(struct ring_descr *rd, dma_addr_t a, u8 s)
*/ */
if ((a & ~DMA_MASK_MSTRPAGE)>>24 != MSTRPAGE_VALUE) { if ((a & ~DMA_MASK_MSTRPAGE)>>24 != MSTRPAGE_VALUE) {
IRDA_ERROR("%s: pci busaddr inconsistency!\n", __FUNCTION__); IRDA_ERROR("%s: pci busaddr inconsistency!\n", __func__);
dump_stack(); dump_stack();
return; return;
} }
......
...@@ -114,7 +114,7 @@ static int __init w83977af_init(void) ...@@ -114,7 +114,7 @@ static int __init w83977af_init(void)
{ {
int i; int i;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
for (i=0; (io[i] < 2000) && (i < ARRAY_SIZE(dev_self)); i++) { for (i=0; (io[i] < 2000) && (i < ARRAY_SIZE(dev_self)); i++) {
if (w83977af_open(i, io[i], irq[i], dma[i]) == 0) if (w83977af_open(i, io[i], irq[i], dma[i]) == 0)
...@@ -133,7 +133,7 @@ static void __exit w83977af_cleanup(void) ...@@ -133,7 +133,7 @@ static void __exit w83977af_cleanup(void)
{ {
int i; int i;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
for (i=0; i < ARRAY_SIZE(dev_self); i++) { for (i=0; i < ARRAY_SIZE(dev_self); i++) {
if (dev_self[i]) if (dev_self[i])
...@@ -154,12 +154,12 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq, ...@@ -154,12 +154,12 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq,
struct w83977af_ir *self; struct w83977af_ir *self;
int err; int err;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
/* Lock the port that we need */ /* Lock the port that we need */
if (!request_region(iobase, CHIP_IO_EXTENT, driver_name)) { if (!request_region(iobase, CHIP_IO_EXTENT, driver_name)) {
IRDA_DEBUG(0, "%s(), can't get iobase of 0x%03x\n", IRDA_DEBUG(0, "%s(), can't get iobase of 0x%03x\n",
__FUNCTION__ , iobase); __func__ , iobase);
return -ENODEV; return -ENODEV;
} }
...@@ -241,7 +241,7 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq, ...@@ -241,7 +241,7 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq,
err = register_netdev(dev); err = register_netdev(dev);
if (err) { if (err) {
IRDA_ERROR("%s(), register_netdevice() failed!\n", __FUNCTION__); IRDA_ERROR("%s(), register_netdevice() failed!\n", __func__);
goto err_out3; goto err_out3;
} }
IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name); IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name);
...@@ -273,7 +273,7 @@ static int w83977af_close(struct w83977af_ir *self) ...@@ -273,7 +273,7 @@ static int w83977af_close(struct w83977af_ir *self)
{ {
int iobase; int iobase;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
iobase = self->io.fir_base; iobase = self->io.fir_base;
...@@ -294,7 +294,7 @@ static int w83977af_close(struct w83977af_ir *self) ...@@ -294,7 +294,7 @@ static int w83977af_close(struct w83977af_ir *self)
/* Release the PORT that this driver is using */ /* Release the PORT that this driver is using */
IRDA_DEBUG(0 , "%s(), Releasing Region %03x\n", IRDA_DEBUG(0 , "%s(), Releasing Region %03x\n",
__FUNCTION__ , self->io.fir_base); __func__ , self->io.fir_base);
release_region(self->io.fir_base, self->io.fir_ext); release_region(self->io.fir_base, self->io.fir_ext);
if (self->tx_buff.head) if (self->tx_buff.head)
...@@ -316,7 +316,7 @@ int w83977af_probe( int iobase, int irq, int dma) ...@@ -316,7 +316,7 @@ int w83977af_probe( int iobase, int irq, int dma)
int i; int i;
for (i=0; i < 2; i++) { for (i=0; i < 2; i++) {
IRDA_DEBUG( 0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG( 0, "%s()\n", __func__ );
#ifdef CONFIG_USE_W977_PNP #ifdef CONFIG_USE_W977_PNP
/* Enter PnP configuration mode */ /* Enter PnP configuration mode */
w977_efm_enter(efbase[i]); w977_efm_enter(efbase[i]);
...@@ -403,7 +403,7 @@ int w83977af_probe( int iobase, int irq, int dma) ...@@ -403,7 +403,7 @@ int w83977af_probe( int iobase, int irq, int dma)
return 0; return 0;
} else { } else {
/* Try next extented function register address */ /* Try next extented function register address */
IRDA_DEBUG( 0, "%s(), Wrong chip version", __FUNCTION__ ); IRDA_DEBUG( 0, "%s(), Wrong chip version", __func__ );
} }
} }
return -1; return -1;
...@@ -439,19 +439,19 @@ void w83977af_change_speed(struct w83977af_ir *self, __u32 speed) ...@@ -439,19 +439,19 @@ void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
case 115200: outb(0x01, iobase+ABLL); break; case 115200: outb(0x01, iobase+ABLL); break;
case 576000: case 576000:
ir_mode = HCR_MIR_576; ir_mode = HCR_MIR_576;
IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __func__ );
break; break;
case 1152000: case 1152000:
ir_mode = HCR_MIR_1152; ir_mode = HCR_MIR_1152;
IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __func__ );
break; break;
case 4000000: case 4000000:
ir_mode = HCR_FIR; ir_mode = HCR_FIR;
IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __func__ );
break; break;
default: default:
ir_mode = HCR_FIR; ir_mode = HCR_FIR;
IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n", __FUNCTION__ , speed); IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n", __func__ , speed);
break; break;
} }
...@@ -501,7 +501,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -501,7 +501,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
iobase = self->io.fir_base; iobase = self->io.fir_base;
IRDA_DEBUG(4, "%s(%ld), skb->len=%d\n", __FUNCTION__ , jiffies, IRDA_DEBUG(4, "%s(%ld), skb->len=%d\n", __func__ , jiffies,
(int) skb->len); (int) skb->len);
/* Lock transmit buffer */ /* Lock transmit buffer */
...@@ -549,7 +549,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -549,7 +549,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
outb(ICR_ETMRI, iobase+ICR); outb(ICR_ETMRI, iobase+ICR);
} else { } else {
#endif #endif
IRDA_DEBUG(4, "%s(%ld), mtt=%d\n", __FUNCTION__ , jiffies, mtt); IRDA_DEBUG(4, "%s(%ld), mtt=%d\n", __func__ , jiffies, mtt);
if (mtt) if (mtt)
udelay(mtt); udelay(mtt);
...@@ -591,7 +591,7 @@ static void w83977af_dma_write(struct w83977af_ir *self, int iobase) ...@@ -591,7 +591,7 @@ static void w83977af_dma_write(struct w83977af_ir *self, int iobase)
unsigned long flags; unsigned long flags;
__u8 hcr; __u8 hcr;
#endif #endif
IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__ , self->tx_buff.len); IRDA_DEBUG(4, "%s(), len=%d\n", __func__ , self->tx_buff.len);
/* Save current set */ /* Save current set */
set = inb(iobase+SSR); set = inb(iobase+SSR);
...@@ -643,7 +643,7 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size) ...@@ -643,7 +643,7 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
int actual = 0; int actual = 0;
__u8 set; __u8 set;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
/* Save current bank */ /* Save current bank */
set = inb(iobase+SSR); set = inb(iobase+SSR);
...@@ -651,11 +651,11 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size) ...@@ -651,11 +651,11 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
switch_bank(iobase, SET0); switch_bank(iobase, SET0);
if (!(inb_p(iobase+USR) & USR_TSRE)) { if (!(inb_p(iobase+USR) & USR_TSRE)) {
IRDA_DEBUG(4, IRDA_DEBUG(4,
"%s(), warning, FIFO not empty yet!\n", __FUNCTION__ ); "%s(), warning, FIFO not empty yet!\n", __func__ );
fifo_size -= 17; fifo_size -= 17;
IRDA_DEBUG(4, "%s(), %d bytes left in tx fifo\n", IRDA_DEBUG(4, "%s(), %d bytes left in tx fifo\n",
__FUNCTION__ , fifo_size); __func__ , fifo_size);
} }
/* Fill FIFO with current frame */ /* Fill FIFO with current frame */
...@@ -665,7 +665,7 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size) ...@@ -665,7 +665,7 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
} }
IRDA_DEBUG(4, "%s(), fifo_size %d ; %d sent of %d\n", IRDA_DEBUG(4, "%s(), fifo_size %d ; %d sent of %d\n",
__FUNCTION__ , fifo_size, actual, len); __func__ , fifo_size, actual, len);
/* Restore bank */ /* Restore bank */
outb(set, iobase+SSR); outb(set, iobase+SSR);
...@@ -685,7 +685,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self) ...@@ -685,7 +685,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
int iobase; int iobase;
__u8 set; __u8 set;
IRDA_DEBUG(4, "%s(%ld)\n", __FUNCTION__ , jiffies); IRDA_DEBUG(4, "%s(%ld)\n", __func__ , jiffies);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
...@@ -700,7 +700,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self) ...@@ -700,7 +700,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
/* Check for underrrun! */ /* Check for underrrun! */
if (inb(iobase+AUDR) & AUDR_UNDR) { if (inb(iobase+AUDR) & AUDR_UNDR) {
IRDA_DEBUG(0, "%s(), Transmit underrun!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), Transmit underrun!\n", __func__ );
self->stats.tx_errors++; self->stats.tx_errors++;
self->stats.tx_fifo_errors++; self->stats.tx_fifo_errors++;
...@@ -741,7 +741,7 @@ int w83977af_dma_receive(struct w83977af_ir *self) ...@@ -741,7 +741,7 @@ int w83977af_dma_receive(struct w83977af_ir *self)
#endif #endif
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_DEBUG(4, "%s\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s\n", __func__ );
iobase= self->io.fir_base; iobase= self->io.fir_base;
...@@ -812,7 +812,7 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self) ...@@ -812,7 +812,7 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self)
__u8 set; __u8 set;
__u8 status; __u8 status;
IRDA_DEBUG(4, "%s\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s\n", __func__ );
st_fifo = &self->st_fifo; st_fifo = &self->st_fifo;
...@@ -892,7 +892,7 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self) ...@@ -892,7 +892,7 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self)
skb = dev_alloc_skb(len+1); skb = dev_alloc_skb(len+1);
if (skb == NULL) { if (skb == NULL) {
printk(KERN_INFO printk(KERN_INFO
"%s(), memory squeeze, dropping frame.\n", __FUNCTION__); "%s(), memory squeeze, dropping frame.\n", __func__);
/* Restore set register */ /* Restore set register */
outb(set, iobase+SSR); outb(set, iobase+SSR);
...@@ -943,7 +943,7 @@ static void w83977af_pio_receive(struct w83977af_ir *self) ...@@ -943,7 +943,7 @@ static void w83977af_pio_receive(struct w83977af_ir *self)
__u8 byte = 0x00; __u8 byte = 0x00;
int iobase; int iobase;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
...@@ -970,7 +970,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr) ...@@ -970,7 +970,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr)
__u8 set; __u8 set;
int iobase; int iobase;
IRDA_DEBUG(4, "%s(), isr=%#x\n", __FUNCTION__ , isr); IRDA_DEBUG(4, "%s(), isr=%#x\n", __func__ , isr);
iobase = self->io.fir_base; iobase = self->io.fir_base;
/* Transmit FIFO low on data */ /* Transmit FIFO low on data */
...@@ -1007,7 +1007,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr) ...@@ -1007,7 +1007,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr)
/* Check if we need to change the speed? */ /* Check if we need to change the speed? */
if (self->new_speed) { if (self->new_speed) {
IRDA_DEBUG(2, IRDA_DEBUG(2,
"%s(), Changing speed!\n", __FUNCTION__ ); "%s(), Changing speed!\n", __func__ );
w83977af_change_speed(self, self->new_speed); w83977af_change_speed(self, self->new_speed);
self->new_speed = 0; self->new_speed = 0;
} }
...@@ -1189,7 +1189,7 @@ static int w83977af_net_open(struct net_device *dev) ...@@ -1189,7 +1189,7 @@ static int w83977af_net_open(struct net_device *dev)
char hwname[32]; char hwname[32];
__u8 set; __u8 set;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
self = (struct w83977af_ir *) dev->priv; self = (struct w83977af_ir *) dev->priv;
...@@ -1252,7 +1252,7 @@ static int w83977af_net_close(struct net_device *dev) ...@@ -1252,7 +1252,7 @@ static int w83977af_net_close(struct net_device *dev)
int iobase; int iobase;
__u8 set; __u8 set;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
...@@ -1307,7 +1307,7 @@ static int w83977af_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1307,7 +1307,7 @@ static int w83977af_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__ , dev->name, cmd); IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__ , dev->name, cmd);
spin_lock_irqsave(&self->lock, flags); spin_lock_irqsave(&self->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment