dm: Use access methods for dev/uclass private data

Most drivers use these access methods but a few do not. Update them.

In some cases the access is not permitted, so mark those with a FIXME tag
for the maintainer to check.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pratyush Yadav <p.yadav@ti.com>
diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c
index d82f3b9..669841e 100644
--- a/drivers/serial/serial_pxa.c
+++ b/drivers/serial/serial_pxa.c
@@ -268,7 +268,7 @@
 #ifdef CONFIG_DM_SERIAL
 static int pxa_serial_probe(struct udevice *dev)
 {
-	struct pxa_serial_plat *plat = dev->plat;
+	struct pxa_serial_plat *plat = dev_get_plat(dev);
 
 	pxa_setbrg_common((struct pxa_uart_regs *)plat->base, plat->port,
 			  plat->baudrate);
@@ -277,7 +277,7 @@
 
 static int pxa_serial_putc(struct udevice *dev, const char ch)
 {
-	struct pxa_serial_plat *plat = dev->plat;
+	struct pxa_serial_plat *plat = dev_get_plat(dev);
 	struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base;
 
 	/* Wait for last character to go. */
@@ -291,7 +291,7 @@
 
 static int pxa_serial_getc(struct udevice *dev)
 {
-	struct pxa_serial_plat *plat = dev->plat;
+	struct pxa_serial_plat *plat = dev_get_plat(dev);
 	struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base;
 
 	/* Wait for a character to arrive. */
@@ -303,7 +303,7 @@
 
 int pxa_serial_setbrg(struct udevice *dev, int baudrate)
 {
-	struct pxa_serial_plat *plat = dev->plat;
+	struct pxa_serial_plat *plat = dev_get_plat(dev);
 	struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base;
 	int port = plat->port;
 
@@ -314,7 +314,7 @@
 
 static int pxa_serial_pending(struct udevice *dev, bool input)
 {
-	struct pxa_serial_plat *plat = dev->plat;
+	struct pxa_serial_plat *plat = dev_get_plat(dev);
 	struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base;
 
 	if (input)