diff options
Diffstat (limited to 'drivers/misc/ti-st/st_core.c')
| -rw-r--r-- | drivers/misc/ti-st/st_core.c | 106 | 
1 files changed, 53 insertions, 53 deletions
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c index 0a142801635..3afe10c0a95 100644 --- a/drivers/misc/ti-st/st_core.c +++ b/drivers/misc/ti-st/st_core.c @@ -67,7 +67,7 @@ int st_get_uart_wr_room(struct st_data_s *st_gdata)  {  	struct tty_struct *tty;  	if (unlikely(st_gdata == NULL || st_gdata->tty == NULL)) { -		pr_err("tty unavailable to perform write"); +		pr_err("tty unavailable to perform write\n");  		return -1;  	}  	tty = st_gdata->tty; @@ -86,7 +86,7 @@ int st_int_write(struct st_data_s *st_gdata,  {  	struct tty_struct *tty;  	if (unlikely(st_gdata == NULL || st_gdata->tty == NULL)) { -		pr_err("tty unavailable to perform write"); +		pr_err("tty unavailable to perform write\n");  		return -EINVAL;  	}  	tty = st_gdata->tty; @@ -109,7 +109,7 @@ static void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata)  	if (unlikely  	    (st_gdata == NULL || st_gdata->rx_skb == NULL  	     || st_gdata->is_registered[chnl_id] == false)) { -		pr_err("chnl_id %d not registered, no data to send?", +		pr_err("chnl_id %d not registered, no data to send?\n",  			   chnl_id);  		kfree_skb(st_gdata->rx_skb);  		return; @@ -124,12 +124,12 @@ static void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata)  			(st_gdata->list[chnl_id]->recv  			(st_gdata->list[chnl_id]->priv_data, st_gdata->rx_skb)  			     != 0)) { -			pr_err(" proto stack %d's ->recv failed", chnl_id); +			pr_err(" proto stack %d's ->recv failed\n", chnl_id);  			kfree_skb(st_gdata->rx_skb);  			return;  		}  	} else { -		pr_err(" proto stack %d's ->recv null", chnl_id); +		pr_err(" proto stack %d's ->recv null\n", chnl_id);  		kfree_skb(st_gdata->rx_skb);  	}  	return; @@ -145,7 +145,7 @@ static void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata)  static void st_reg_complete(struct st_data_s *st_gdata, char err)  {  	unsigned char i = 0; -	pr_info(" %s ", __func__); +	pr_info(" %s\n", __func__);  	for (i = 0; i < ST_MAX_CHANNELS; i++) {  		if (likely(st_gdata != NULL &&  			st_gdata->is_registered[i] == true && @@ -166,7 +166,7 @@ static inline int st_check_data_len(struct st_data_s *st_gdata,  {  	int room = skb_tailroom(st_gdata->rx_skb); -	pr_debug("len %d room %d", len, room); +	pr_debug("len %d room %d\n", len, room);  	if (!len) {  		/* Received packet has only packet header and @@ -179,7 +179,7 @@ static inline int st_check_data_len(struct st_data_s *st_gdata,  		/* Received packet's payload length is larger.  		 * We can't accommodate it in created skb.  		 */ -		pr_err("Data length is too large len %d room %d", len, +		pr_err("Data length is too large len %d room %d\n", len,  			   room);  		kfree_skb(st_gdata->rx_skb);  	} else { @@ -249,12 +249,12 @@ void st_int_recv(void *disc_data,  	ptr = (char *)data;  	/* tty_receive sent null ? */  	if (unlikely(ptr == NULL) || (st_gdata == NULL)) { -		pr_err(" received null from TTY "); +		pr_err(" received null from TTY\n");  		return;  	}  	pr_debug("count %ld rx_state %ld" -		   "rx_count %ld", count, st_gdata->rx_state, +		   "rx_count %ld\n", count, st_gdata->rx_state,  		   st_gdata->rx_count);  	spin_lock_irqsave(&st_gdata->lock, flags); @@ -274,7 +274,7 @@ void st_int_recv(void *disc_data,  			switch (st_gdata->rx_state) {  			/* Waiting for complete packet ? */  			case ST_W4_DATA: -				pr_debug("Complete pkt received"); +				pr_debug("Complete pkt received\n");  				/* Ask ST CORE to forward  				 * the packet to protocol driver */  				st_send_frame(st_gdata->rx_chnl, st_gdata); @@ -313,7 +313,7 @@ void st_int_recv(void *disc_data,  		case LL_SLEEP_IND:  		case LL_SLEEP_ACK:  		case LL_WAKE_UP_IND: -			pr_debug("PM packet"); +			pr_debug("PM packet\n");  			/* this takes appropriate action based on  			 * sleep state received --  			 */ @@ -330,7 +330,7 @@ void st_int_recv(void *disc_data,  			count--;  			continue;  		case LL_WAKE_UP_ACK: -			pr_debug("PM packet"); +			pr_debug("PM packet\n");  			spin_unlock_irqrestore(&st_gdata->lock, flags);  			/* wake up ack received */ @@ -345,7 +345,7 @@ void st_int_recv(void *disc_data,  			type = *ptr;  			if (st_gdata->list[type] == NULL) {  				pr_err("chip/interface misbehavior dropping" -					" frame starting with 0x%02x", type); +					" frame starting with 0x%02x\n", type);  				goto done;  			} @@ -372,7 +372,7 @@ void st_int_recv(void *disc_data,  	}  done:  	spin_unlock_irqrestore(&st_gdata->lock, flags); -	pr_debug("done %s", __func__); +	pr_debug("done %s\n", __func__);  	return;  } @@ -386,7 +386,7 @@ static struct sk_buff *st_int_dequeue(struct st_data_s *st_gdata)  {  	struct sk_buff *returning_skb; -	pr_debug("%s", __func__); +	pr_debug("%s\n", __func__);  	if (st_gdata->tx_skb != NULL) {  		returning_skb = st_gdata->tx_skb;  		st_gdata->tx_skb = NULL; @@ -408,12 +408,12 @@ static void st_int_enqueue(struct st_data_s *st_gdata, struct sk_buff *skb)  {  	unsigned long flags = 0; -	pr_debug("%s", __func__); +	pr_debug("%s\n", __func__);  	spin_lock_irqsave(&st_gdata->lock, flags);  	switch (st_ll_getstate(st_gdata)) {  	case ST_LL_AWAKE: -		pr_debug("ST LL is AWAKE, sending normally"); +		pr_debug("ST LL is AWAKE, sending normally\n");  		skb_queue_tail(&st_gdata->txq, skb);  		break;  	case ST_LL_ASLEEP_TO_AWAKE: @@ -421,7 +421,7 @@ static void st_int_enqueue(struct st_data_s *st_gdata, struct sk_buff *skb)  		break;  	case ST_LL_AWAKE_TO_ASLEEP:  		pr_err("ST LL is illegal state(%ld)," -			   "purging received skb.", st_ll_getstate(st_gdata)); +			   "purging received skb.\n", st_ll_getstate(st_gdata));  		kfree_skb(skb);  		break;  	case ST_LL_ASLEEP: @@ -430,13 +430,13 @@ static void st_int_enqueue(struct st_data_s *st_gdata, struct sk_buff *skb)  		break;  	default:  		pr_err("ST LL is illegal state(%ld)," -			   "purging received skb.", st_ll_getstate(st_gdata)); +			   "purging received skb.\n", st_ll_getstate(st_gdata));  		kfree_skb(skb);  		break;  	}  	spin_unlock_irqrestore(&st_gdata->lock, flags); -	pr_debug("done %s", __func__); +	pr_debug("done %s\n", __func__);  	return;  } @@ -450,10 +450,10 @@ void st_tx_wakeup(struct st_data_s *st_data)  {  	struct sk_buff *skb;  	unsigned long flags;	/* for irq save flags */ -	pr_debug("%s", __func__); +	pr_debug("%s\n", __func__);  	/* check for sending & set flag sending here */  	if (test_and_set_bit(ST_TX_SENDING, &st_data->tx_state)) { -		pr_debug("ST already sending"); +		pr_debug("ST already sending\n");  		/* keep sending */  		set_bit(ST_TX_WAKEUP, &st_data->tx_state);  		return; @@ -514,17 +514,17 @@ long st_register(struct st_proto_s *new_proto)  	st_kim_ref(&st_gdata, 0);  	if (st_gdata == NULL || new_proto == NULL || new_proto->recv == NULL  	    || new_proto->reg_complete_cb == NULL) { -		pr_err("gdata/new_proto/recv or reg_complete_cb not ready"); +		pr_err("gdata/new_proto/recv or reg_complete_cb not ready\n");  		return -EINVAL;  	}  	if (new_proto->chnl_id >= ST_MAX_CHANNELS) { -		pr_err("chnl_id %d not supported", new_proto->chnl_id); +		pr_err("chnl_id %d not supported\n", new_proto->chnl_id);  		return -EPROTONOSUPPORT;  	}  	if (st_gdata->is_registered[new_proto->chnl_id] == true) { -		pr_err("chnl_id %d already registered", new_proto->chnl_id); +		pr_err("chnl_id %d already registered\n", new_proto->chnl_id);  		return -EALREADY;  	} @@ -532,7 +532,7 @@ long st_register(struct st_proto_s *new_proto)  	spin_lock_irqsave(&st_gdata->lock, flags);  	if (test_bit(ST_REG_IN_PROGRESS, &st_gdata->st_state)) { -		pr_info(" ST_REG_IN_PROGRESS:%d ", new_proto->chnl_id); +		pr_info(" ST_REG_IN_PROGRESS:%d\n", new_proto->chnl_id);  		/* fw download in progress */  		add_channel_to_table(st_gdata, new_proto); @@ -543,7 +543,7 @@ long st_register(struct st_proto_s *new_proto)  		spin_unlock_irqrestore(&st_gdata->lock, flags);  		return -EINPROGRESS;  	} else if (st_gdata->protos_registered == ST_EMPTY) { -		pr_info(" chnl_id list empty :%d ", new_proto->chnl_id); +		pr_info(" chnl_id list empty :%d\n", new_proto->chnl_id);  		set_bit(ST_REG_IN_PROGRESS, &st_gdata->st_state);  		st_recv = st_kim_recv; @@ -561,7 +561,7 @@ long st_register(struct st_proto_s *new_proto)  			clear_bit(ST_REG_IN_PROGRESS, &st_gdata->st_state);  			if ((st_gdata->protos_registered != ST_EMPTY) &&  			    (test_bit(ST_REG_PENDING, &st_gdata->st_state))) { -				pr_err(" KIM failure complete callback "); +				pr_err(" KIM failure complete callback\n");  				st_reg_complete(st_gdata, err);  				clear_bit(ST_REG_PENDING, &st_gdata->st_state);  			} @@ -578,7 +578,7 @@ long st_register(struct st_proto_s *new_proto)  		 */  		if ((st_gdata->protos_registered != ST_EMPTY) &&  		    (test_bit(ST_REG_PENDING, &st_gdata->st_state))) { -			pr_debug(" call reg complete callback "); +			pr_debug(" call reg complete callback\n");  			st_reg_complete(st_gdata, 0);  		}  		clear_bit(ST_REG_PENDING, &st_gdata->st_state); @@ -587,7 +587,7 @@ long st_register(struct st_proto_s *new_proto)  		 * since the above check is old  		 */  		if (st_gdata->is_registered[new_proto->chnl_id] == true) { -			pr_err(" proto %d already registered ", +			pr_err(" proto %d already registered\n",  				   new_proto->chnl_id);  			spin_unlock_irqrestore(&st_gdata->lock, flags);  			return -EALREADY; @@ -609,7 +609,7 @@ long st_register(struct st_proto_s *new_proto)  		spin_unlock_irqrestore(&st_gdata->lock, flags);  		return err;  	} -	pr_debug("done %s(%d) ", __func__, new_proto->chnl_id); +	pr_debug("done %s(%d)\n", __func__, new_proto->chnl_id);  }  EXPORT_SYMBOL_GPL(st_register); @@ -622,18 +622,18 @@ long st_unregister(struct st_proto_s *proto)  	unsigned long flags = 0;  	struct st_data_s	*st_gdata; -	pr_debug("%s: %d ", __func__, proto->chnl_id); +	pr_debug("%s: %d\n", __func__, proto->chnl_id);  	st_kim_ref(&st_gdata, 0);  	if (!st_gdata || proto->chnl_id >= ST_MAX_CHANNELS) { -		pr_err(" chnl_id %d not supported", proto->chnl_id); +		pr_err(" chnl_id %d not supported\n", proto->chnl_id);  		return -EPROTONOSUPPORT;  	}  	spin_lock_irqsave(&st_gdata->lock, flags);  	if (st_gdata->is_registered[proto->chnl_id] == false) { -		pr_err(" chnl_id %d not registered", proto->chnl_id); +		pr_err(" chnl_id %d not registered\n", proto->chnl_id);  		spin_unlock_irqrestore(&st_gdata->lock, flags);  		return -EPROTONOSUPPORT;  	} @@ -648,7 +648,7 @@ long st_unregister(struct st_proto_s *proto)  	if ((st_gdata->protos_registered == ST_EMPTY) &&  	    (!test_bit(ST_REG_PENDING, &st_gdata->st_state))) { -		pr_info(" all chnl_ids unregistered "); +		pr_info(" all chnl_ids unregistered\n");  		/* stop traffic on tty */  		if (st_gdata->tty) { @@ -676,11 +676,11 @@ long st_write(struct sk_buff *skb)  	st_kim_ref(&st_gdata, 0);  	if (unlikely(skb == NULL || st_gdata == NULL  		|| st_gdata->tty == NULL)) { -		pr_err("data/tty unavailable to perform write"); +		pr_err("data/tty unavailable to perform write\n");  		return -EINVAL;  	} -	pr_debug("%d to be written", skb->len); +	pr_debug("%d to be written\n", skb->len);  	len = skb->len;  	/* st_ll to decide where to enqueue the skb */ @@ -703,7 +703,7 @@ static int st_tty_open(struct tty_struct *tty)  {  	int err = 0;  	struct st_data_s *st_gdata; -	pr_info("%s ", __func__); +	pr_info("%s\n", __func__);  	st_kim_ref(&st_gdata, 0);  	st_gdata->tty = tty; @@ -723,7 +723,7 @@ static int st_tty_open(struct tty_struct *tty)  	 * installation of N_TI_WL ldisc is complete  	 */  	st_kim_complete(st_gdata->kim_data); -	pr_debug("done %s", __func__); +	pr_debug("done %s\n", __func__);  	return err;  } @@ -733,7 +733,7 @@ static void st_tty_close(struct tty_struct *tty)  	unsigned long flags = 0;  	struct	st_data_s *st_gdata = tty->disc_data; -	pr_info("%s ", __func__); +	pr_info("%s\n", __func__);  	/* TODO:  	 * if a protocol has been registered & line discipline @@ -742,7 +742,7 @@ static void st_tty_close(struct tty_struct *tty)  	spin_lock_irqsave(&st_gdata->lock, flags);  	for (i = ST_BT; i < ST_MAX_CHANNELS; i++) {  		if (st_gdata->is_registered[i] == true) -			pr_err("%d not un-registered", i); +			pr_err("%d not un-registered\n", i);  		st_gdata->list[i] = NULL;  		st_gdata->is_registered[i] = false;  	} @@ -769,7 +769,7 @@ static void st_tty_close(struct tty_struct *tty)  	st_gdata->rx_skb = NULL;  	spin_unlock_irqrestore(&st_gdata->lock, flags); -	pr_debug("%s: done ", __func__); +	pr_debug("%s: done\n", __func__);  }  static void st_tty_receive(struct tty_struct *tty, const unsigned char *data, @@ -785,7 +785,7 @@ static void st_tty_receive(struct tty_struct *tty, const unsigned char *data,  	 * to KIM for validation  	 */  	st_recv(tty->disc_data, data, count); -	pr_debug("done %s", __func__); +	pr_debug("done %s\n", __func__);  }  /* wake-up function called in from the TTY layer @@ -794,7 +794,7 @@ static void st_tty_receive(struct tty_struct *tty, const unsigned char *data,  static void st_tty_wakeup(struct tty_struct *tty)  {  	struct	st_data_s *st_gdata = tty->disc_data; -	pr_debug("%s ", __func__); +	pr_debug("%s\n", __func__);  	/* don't do an wakeup for now */  	clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); @@ -805,7 +805,7 @@ static void st_tty_wakeup(struct tty_struct *tty)  static void st_tty_flush_buffer(struct tty_struct *tty)  {  	struct	st_data_s *st_gdata = tty->disc_data; -	pr_debug("%s ", __func__); +	pr_debug("%s\n", __func__);  	kfree_skb(st_gdata->tx_skb);  	st_gdata->tx_skb = NULL; @@ -833,7 +833,7 @@ int st_core_init(struct st_data_s **core_data)  	err = tty_register_ldisc(N_TI_WL, &st_ldisc_ops);  	if (err) { -		pr_err("error registering %d line discipline %ld", +		pr_err("error registering %d line discipline %ld\n",  			   N_TI_WL, err);  		return err;  	} @@ -841,10 +841,10 @@ int st_core_init(struct st_data_s **core_data)  	st_gdata = kzalloc(sizeof(struct st_data_s), GFP_KERNEL);  	if (!st_gdata) { -		pr_err("memory allocation failed"); +		pr_err("memory allocation failed\n");  		err = tty_unregister_ldisc(N_TI_WL);  		if (err) -			pr_err("unable to un-register ldisc %ld", err); +			pr_err("unable to un-register ldisc %ld\n", err);  		err = -ENOMEM;  		return err;  	} @@ -860,11 +860,11 @@ int st_core_init(struct st_data_s **core_data)  	err = st_ll_init(st_gdata);  	if (err) { -		pr_err("error during st_ll initialization(%ld)", err); +		pr_err("error during st_ll initialization(%ld)\n", err);  		kfree(st_gdata);  		err = tty_unregister_ldisc(N_TI_WL);  		if (err) -			pr_err("unable to un-register ldisc"); +			pr_err("unable to un-register ldisc\n");  		return err;  	}  	*core_data = st_gdata; @@ -877,7 +877,7 @@ void st_core_exit(struct st_data_s *st_gdata)  	/* internal module cleanup */  	err = st_ll_deinit(st_gdata);  	if (err) -		pr_err("error during deinit of ST LL %ld", err); +		pr_err("error during deinit of ST LL %ld\n", err);  	if (st_gdata != NULL) {  		/* Free ST Tx Qs and skbs */ @@ -888,7 +888,7 @@ void st_core_exit(struct st_data_s *st_gdata)  		/* TTY ldisc cleanup */  		err = tty_unregister_ldisc(N_TI_WL);  		if (err) -			pr_err("unable to un-register ldisc %ld", err); +			pr_err("unable to un-register ldisc %ld\n", err);  		/* free the global data pointer */  		kfree(st_gdata);  	}  |