lkml.org 
[lkml]   [2014]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/2] tty: serial: 8250: Add Mediatek UART driver
[...]

> +static int mtk8250_probe_of(struct platform_device *pdev, struct uart_port *p,
> + struct mtk8250_data *data)
> +{
> + int err;
> + struct device_node *np = pdev->dev.of_node;
> +
> + data->clk = of_clk_get(np, 0);
> + if (IS_ERR(data->clk)) {
> + dev_warn(&pdev->dev, "Can't get timer clock\n");
> + return PTR_ERR(data->clk);
> + }

Elsewhere you use devm_ interfaces. Can we not use devm_clk_get?

You might need to give the clock a name, but that's generally a good
thing -- it helps if a future revision has multiple clocks.

Mark.


\
 
 \ /
  Last update: 2014-09-02 13:41    [W:0.071 / U:3.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site