goto error_free_irq;
}
- ret = clk_prepare(st->clk);
+ ret = clk_prepare_enable(st->clk);
if (ret) {
- dev_err(&pdev->dev, "Could not prepare the clock.\n");
- goto error_free_clk;
- }
-
- ret = clk_enable(st->clk);
- if (ret) {
- dev_err(&pdev->dev, "Could not enable the clock.\n");
- goto error_unprepare_clk;
+ dev_err(&pdev->dev,
+ "Could not prepare or enable the clock.\n");
+ goto error_free_irq;
}
- st->adc_clk = clk_get(&pdev->dev, "adc_op_clk");
+ st->adc_clk = devm_clk_get(&pdev->dev, "adc_op_clk");
if (IS_ERR(st->adc_clk)) {
dev_err(&pdev->dev, "Failed to get the ADC clock.\n");
- ret = PTR_ERR(st->clk);
+ ret = PTR_ERR(st->adc_clk);
goto error_disable_clk;
}
struct ipoctal *ipoctal = tty->driver_data;
speed_t baud;
- cflag = tty->termios->c_cflag;
+ cflag = tty->termios.c_cflag;
/* Disable and reset everything before change the setup */
- ipoctal_write_io_reg(ipoctal, &ipoctal->chan_regs[channel].u.w.cr,
+ ipoctal_write_io_reg(ipoctal, &ipoctal->chan_regs[channel].w.cr,
CR_DISABLE_RX | CR_DISABLE_TX);
- ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].u.w.cr,
+ ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].w.cr,
CR_CMD_RESET_RX);
- ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].u.w.cr,
+ ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].w.cr,
CR_CMD_RESET_TX);
- ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].u.w.cr,
+ ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].w.cr,
CR_CMD_RESET_ERR_STATUS);
- ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].u.w.cr,
+ ipoctal_write_cr_cmd(ipoctal, &ipoctal->chan_regs[channel].w.cr,
CR_CMD_RESET_MR);
/* Set Bits per chars */