Merge tag 'mips_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips
[linux] / drivers / tty / serial / bcm63xx_uart.c
index 474652d..b7adc61 100644 (file)
@@ -1,9 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
  * Derived from many drivers using generic_serial interface.
  *
  * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
@@ -847,8 +843,10 @@ static int bcm_uart_probe(struct platform_device *pdev)
        if (!res_irq)
                return -ENODEV;
 
-       clk = pdev->dev.of_node ? of_clk_get(pdev->dev.of_node, 0) :
-                                 clk_get(&pdev->dev, "periph");
+       clk = clk_get(&pdev->dev, "refclk");
+       if (IS_ERR(clk) && pdev->dev.of_node)
+               clk = of_clk_get(pdev->dev.of_node, 0);
+
        if (IS_ERR(clk))
                return -ENODEV;