dm: treewide: Rename dev_get_platdata() to dev_get_plat()
[platform/kernel/u-boot.git] / drivers / serial / lpc32xx_hsuart.c
index b425375..4e34643 100644 (file)
@@ -1,10 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2011-2015 Vladimir Zapolskiy <vz@mleia.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <dm.h>
 #include <serial.h>
 #include <dm/platform_data/lpc32xx_hsuart.h>
@@ -12,8 +12,6 @@
 #include <asm/arch/uart.h>
 #include <linux/compiler.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct lpc32xx_hsuart_priv {
        struct hsuart_regs *hsuart;
 };
@@ -87,10 +85,10 @@ static int lpc32xx_serial_init(struct hsuart_regs *hsuart)
 
 static int lpc32xx_hsuart_probe(struct udevice *dev)
 {
-       struct lpc32xx_hsuart_platdata *platdata = dev_get_platdata(dev);
+       struct lpc32xx_hsuart_platdata *plat = dev_get_plat(dev);
        struct lpc32xx_hsuart_priv *priv = dev_get_priv(dev);
 
-       priv->hsuart = (struct hsuart_regs *)platdata->base;
+       priv->hsuart = (struct hsuart_regs *)plat->base;
 
        lpc32xx_serial_init(priv->hsuart);
 
@@ -109,6 +107,6 @@ U_BOOT_DRIVER(lpc32xx_hsuart) = {
        .id     = UCLASS_SERIAL,
        .probe  = lpc32xx_hsuart_probe,
        .ops    = &lpc32xx_hsuart_ops,
-       .priv_auto_alloc_size = sizeof(struct lpc32xx_hsuart_priv),
+       .priv_auto      = sizeof(struct lpc32xx_hsuart_priv),
        .flags  = DM_FLAG_PRE_RELOC,
 };