int s3c24xx_serial_probe(struct platform_device *dev,

來源:互聯網
上載者:User

drivers/tty/serial/samsung.c

int s3c24xx_serial_probe(struct platform_device *dev,

             struct s3c24xx_uart_info *info)
{
    struct s3c24xx_uart_port *ourport;
    int ret;

    dbg("s3c24xx_serial_probe(%p, %p) %d\n", dev, info, probe_index);

    ourport = &s3c24xx_serial_ports[probe_index];
    probe_index++;

    dbg("%s: initialising port %p...\n", __func__, ourport);

    ret = s3c24xx_serial_init_port(ourport, info, dev);
    if (ret < 0)
        goto probe_err;

    dbg("%s: adding port\n", __func__);
    uart_add_one_port(&s3c24xx_uart_drv, &ourport->port);
    platform_set_drvdata(dev, &ourport->port);

    ret = device_create_file(&dev->dev, &dev_attr_clock_source);
    if (ret < 0)
        printk(KERN_ERR "%s: failed to add clksrc attr.\n", __func__);

    ret = s3c24xx_serial_cpufreq_register(ourport);
    if (ret < 0)
        dev_err(&dev->dev, "failed to add cpufreq notifier\n");

    return 0;

 probe_err:
    return ret;
}

EXPORT_SYMBOL_GPL(s3c24xx_serial_probe);

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.