Messages in this thread | | | Date | Tue, 2 Sep 2014 12:35:30 +0100 | From | Mark Rutland <> | Subject | Re: [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.
| |