ipoctal
ipack_put_carrier(ipoctal->dev);
struct ipoctal *ipoctal = arg;
readw(ipoctal->int_space + ACK_INT_REQ0);
readw(ipoctal->int_space + ACK_INT_REQ1);
ipoctal_irq_channel(&ipoctal->channel[i]);
static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
ipoctal->board_id = ipoctal->dev->id_device;
region = &ipoctal->dev->region[IPACK_IO_SPACE];
addr = devm_ioremap(&ipoctal->dev->dev,
dev_err(&ipoctal->dev->dev,
region = &ipoctal->dev->region[IPACK_INT_SPACE];
ipoctal->int_space =
devm_ioremap(&ipoctal->dev->dev,
if (!ipoctal->int_space) {
dev_err(&ipoctal->dev->dev,
region = &ipoctal->dev->region[IPACK_MEM8_SPACE];
ipoctal->mem8_space =
devm_ioremap(&ipoctal->dev->dev,
if (!ipoctal->mem8_space) {
dev_err(&ipoctal->dev->dev,
struct ipoctal_channel *channel = &ipoctal->channel[i];
channel->board_id = ipoctal->board_id;
iowrite8(1, ipoctal->mem8_space + 1);
dev_err(&ipoctal->dev->dev, "Can't register tty driver.\n");
ipoctal->tty_drv = drv;
channel = &ipoctal->channel[i];
dev_err(&ipoctal->dev->dev, "Failed to register tty device.\n");
ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
ipoctal_irq_handler, ipoctal);
static inline struct ipoctal *chan_to_ipoctal(struct ipoctal_channel *chan,
return container_of(chan, struct ipoctal, channel[index]);
struct ipoctal *ipoctal = chan_to_ipoctal(channel, tty->index);
ipack_put_carrier(ipoctal->dev);
struct ipoctal *ipoctal;
ipoctal = kzalloc_obj(struct ipoctal);
if (ipoctal == NULL)
ipoctal->dev = dev;
res = ipoctal_inst_slot(ipoctal, dev->bus->bus_nr, dev->slot);
dev_set_drvdata(&dev->dev, ipoctal);
kfree(ipoctal);
static void __ipoctal_remove(struct ipoctal *ipoctal)
ipoctal->dev->bus->ops->free_irq(ipoctal->dev);
struct ipoctal_channel *channel = &ipoctal->channel[i];
tty_unregister_device(ipoctal->tty_drv, i);
tty_unregister_driver(ipoctal->tty_drv);
kfree(ipoctal->tty_drv->name);
tty_driver_kref_put(ipoctal->tty_drv);
kfree(ipoctal);
struct ipoctal *ipoctal = chan_to_ipoctal(channel, tty->index);
if (!ipack_get_carrier(ipoctal->dev))