Advertisement
Guest User

Untitled

a guest
Mar 25th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. diff --git a/arch/arm/mach-msm/smd_tty.c b/arch/arm/mach-msm/smd_tty.c
  2. index 8bea09e..e12e536 100644
  3. --- a/arch/arm/mach-msm/smd_tty.c
  4. +++ b/arch/arm/mach-msm/smd_tty.c
  5. @@ -57,8 +57,18 @@ static void smd_readx_cb(void *data, int count, void *ctxt)
  6. {
  7. struct tty_struct *tty = ctxt;
  8. struct tty_ldisc *ld;
  9. + int idx;
  10. if (!tty)
  11. return;
  12. +
  13. + if(tty->index==0)
  14. + {
  15. + printk("SMD Read: ");
  16. + for(idx=0; idx < count; idx++)
  17. + printk("%c", ((unsigned char*)data)[idx]);
  18. + printk("\n");
  19. + }
  20. +
  21. ld = tty_ldisc_ref(tty);
  22. if (ld) {
  23. if (ld->ops->receive_buf)
  24. @@ -190,6 +200,7 @@ static int smd_tty_write(struct tty_struct *tty, const unsigned char *buf, int l
  25. {
  26. struct smd_tty_info *info = tty->driver_data;
  27. int avail;
  28. + int idx;
  29.  
  30. /* if we're writing to a packet channel we will
  31. ** never be able to write more data than there
  32. @@ -199,6 +210,14 @@ static int smd_tty_write(struct tty_struct *tty, const unsigned char *buf, int l
  33. if (len > avail)
  34. len = avail;
  35.  
  36. + if(tty->index==0)
  37. + {
  38. + printk("SMD Write: ");
  39. + for(idx=0; idx < len; idx++)
  40. + printk("%c", buf[idx]);
  41. + printk("\n");
  42. + }
  43. +
  44. return smd_write(info->ch, buf, len);
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement