#define MAX_DEVICES 12
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
if (sanity_check(info, tty->name, "write"))
goto cleanup;
- if (!info->tx_buf)
+ if (!tty || !info->tx_buf)
goto cleanup;
if (info->params.mode == MGSL_MODE_HDLC) {
if (sanity_check(info, tty->name, "put_char"))
return;
- if (!info->tx_buf)
+ if (!tty || !info->tx_buf)
return;
spin_lock_irqsave(&info->lock,flags);
spin_lock_irqsave(&info->lock, flags);
get_signals(info);
spin_unlock_irqrestore(&info->lock, flags);
- if (info->serial_signals & SerialSignal_DCD)
- netif_carrier_on(dev);
- else
- netif_carrier_off(dev);
+ hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev);
+
return 0;
}
} else
info->input_signal_events.dcd_down++;
#ifdef CONFIG_HDLC
- if (info->netcount) {
- if (status & SerialSignal_DCD)
- netif_carrier_on(info->netdev);
- else
- netif_carrier_off(info->netdev);
- }
+ if (info->netcount)
+ hdlc_set_carrier(status & SerialSignal_DCD, info->netdev);
#endif
}
if (status & MISCSTATUS_CTS_LATCHED)
info->phys_statctrl_base &= ~(PAGE_SIZE-1);
info->bus_type = MGSL_BUS_TYPE_PCI;
- info->irq_flags = IRQF_SHARED;
+ info->irq_flags = SA_SHIRQ;
init_timer(&info->tx_timer);
info->tx_timer.data = (unsigned long)info;