- if (from_user) {
- unsigned char *buf_tmp;
-
- buf_tmp = cpc_tty->buf_tx;
- if (copy_from_user(buf_tmp, buf, count)) {
- /* failed to copy from user */
- CPC_TTY_DBG("%s: error in copy from user\n",cpc_tty->name);
- return -EINVAL;
- }
-
- if (cpc_tty_send_to_card(cpc_tty->pc300dev, (void*) buf_tmp,count)) {
- /* failed to send */
- CPC_TTY_DBG("%s: transmission error\n",cpc_tty->name);
- return 0;
- }
- } else {
- if (cpc_tty_send_to_card(cpc_tty->pc300dev, (void*)buf, count)) {
- /* failed to send */
- CPC_TTY_DBG("%s: trasmition error\n", cpc_tty->name);
- return 0;
- }
+ if (cpc_tty_send_to_card(cpc_tty->pc300dev, (void*)buf, count)) {
+ /* failed to send */
+ CPC_TTY_DBG("%s: trasmition error\n", cpc_tty->name);
+ return 0;