Re: [PATCH v4 1/2] tty: serial: 8250: Add Mediatek UART driver

From: Mark Rutland
Date: Tue Sep 02 2014 - 07:35:39 EST


[...]

> +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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/