aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/apbuart.c10
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c9
-rw-r--r--drivers/serial/mpc52xx_uart.c15
-rw-r--r--drivers/serial/nwpserial.c2
-rw-r--r--drivers/serial/of_serial.c12
-rw-r--r--drivers/serial/pmac_zilog.c2
-rw-r--r--drivers/serial/sunhv.c9
-rw-r--r--drivers/serial/sunsab.c13
-rw-r--r--drivers/serial/sunsu.c13
-rw-r--r--drivers/serial/sunzilog.c15
-rw-r--r--drivers/serial/uartlite.c11
-rw-r--r--drivers/serial/ucc_uart.c10
12 files changed, 70 insertions, 51 deletions
diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c
index fe91319b5f65..0099b8692b60 100644
--- a/drivers/serial/apbuart.c
+++ b/drivers/serial/apbuart.c
@@ -559,7 +559,7 @@ static int __devinit apbuart_probe(struct of_device *op,
559 559
560 i = 0; 560 i = 0;
561 for (i = 0; i < grlib_apbuart_port_nr; i++) { 561 for (i = 0; i < grlib_apbuart_port_nr; i++) {
562 if (op->node == grlib_apbuart_nodes[i]) 562 if (op->dev.of_node == grlib_apbuart_nodes[i])
563 break; 563 break;
564 } 564 }
565 565
@@ -584,12 +584,12 @@ static struct of_device_id __initdata apbuart_match[] = {
584}; 584};
585 585
586static struct of_platform_driver grlib_apbuart_of_driver = { 586static struct of_platform_driver grlib_apbuart_of_driver = {
587 .match_table = apbuart_match,
588 .probe = apbuart_probe, 587 .probe = apbuart_probe,
589 .driver = { 588 .driver = {
590 .owner = THIS_MODULE, 589 .owner = THIS_MODULE,
591 .name = "grlib-apbuart", 590 .name = "grlib-apbuart",
592 }, 591 .of_match_table = apbuart_match,
592 },
593}; 593};
594 594
595 595
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 300cea768d74..9eb62a256e9a 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -1342,7 +1342,7 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev,
1342 /* initialize the device pointer for the port */ 1342 /* initialize the device pointer for the port */
1343 pinfo->port.dev = &ofdev->dev; 1343 pinfo->port.dev = &ofdev->dev;
1344 1344
1345 ret = cpm_uart_init_port(ofdev->node, pinfo); 1345 ret = cpm_uart_init_port(ofdev->dev.of_node, pinfo);
1346 if (ret) 1346 if (ret)
1347 return ret; 1347 return ret;
1348 1348
@@ -1372,8 +1372,11 @@ static struct of_device_id cpm_uart_match[] = {
1372}; 1372};
1373 1373
1374static struct of_platform_driver cpm_uart_driver = { 1374static struct of_platform_driver cpm_uart_driver = {
1375 .name = "cpm_uart", 1375 .driver = {
1376 .match_table = cpm_uart_match, 1376 .name = "cpm_uart",
1377 .owner = THIS_MODULE,
1378 .of_match_table = cpm_uart_match,
1379 },
1377 .probe = cpm_uart_probe, 1380 .probe = cpm_uart_probe,
1378 .remove = cpm_uart_remove, 1381 .remove = cpm_uart_remove,
1379 }; 1382 };
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 02469c31bf0b..beb4710faeee 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -1295,14 +1295,14 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
1295 1295
1296 /* Check validity & presence */ 1296 /* Check validity & presence */
1297 for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++) 1297 for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++)
1298 if (mpc52xx_uart_nodes[idx] == op->node) 1298 if (mpc52xx_uart_nodes[idx] == op->dev.of_node)
1299 break; 1299 break;
1300 if (idx >= MPC52xx_PSC_MAXNUM) 1300 if (idx >= MPC52xx_PSC_MAXNUM)
1301 return -EINVAL; 1301 return -EINVAL;
1302 pr_debug("Found %s assigned to ttyPSC%x\n", 1302 pr_debug("Found %s assigned to ttyPSC%x\n",
1303 mpc52xx_uart_nodes[idx]->full_name, idx); 1303 mpc52xx_uart_nodes[idx]->full_name, idx);
1304 1304
1305 uartclk = psc_ops->getuartclk(op->node); 1305 uartclk = psc_ops->getuartclk(op->dev.of_node);
1306 if (uartclk == 0) { 1306 if (uartclk == 0) {
1307 dev_dbg(&op->dev, "Could not find uart clock frequency!\n"); 1307 dev_dbg(&op->dev, "Could not find uart clock frequency!\n");
1308 return -EINVAL; 1308 return -EINVAL;
@@ -1322,7 +1322,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
1322 port->dev = &op->dev; 1322 port->dev = &op->dev;
1323 1323
1324 /* Search for IRQ and mapbase */ 1324 /* Search for IRQ and mapbase */
1325 ret = of_address_to_resource(op->node, 0, &res); 1325 ret = of_address_to_resource(op->dev.of_node, 0, &res);
1326 if (ret) 1326 if (ret)
1327 return ret; 1327 return ret;
1328 1328
@@ -1332,7 +1332,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
1332 return -EINVAL; 1332 return -EINVAL;
1333 } 1333 }
1334 1334
1335 psc_ops->get_irq(port, op->node); 1335 psc_ops->get_irq(port, op->dev.of_node);
1336 if (port->irq == NO_IRQ) { 1336 if (port->irq == NO_IRQ) {
1337 dev_dbg(&op->dev, "Could not get irq\n"); 1337 dev_dbg(&op->dev, "Could not get irq\n");
1338 return -EINVAL; 1338 return -EINVAL;
@@ -1431,15 +1431,16 @@ mpc52xx_uart_of_enumerate(void)
1431MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match); 1431MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match);
1432 1432
1433static struct of_platform_driver mpc52xx_uart_of_driver = { 1433static struct of_platform_driver mpc52xx_uart_of_driver = {
1434 .match_table = mpc52xx_uart_of_match,
1435 .probe = mpc52xx_uart_of_probe, 1434 .probe = mpc52xx_uart_of_probe,
1436 .remove = mpc52xx_uart_of_remove, 1435 .remove = mpc52xx_uart_of_remove,
1437#ifdef CONFIG_PM 1436#ifdef CONFIG_PM
1438 .suspend = mpc52xx_uart_of_suspend, 1437 .suspend = mpc52xx_uart_of_suspend,
1439 .resume = mpc52xx_uart_of_resume, 1438 .resume = mpc52xx_uart_of_resume,
1440#endif 1439#endif
1441 .driver = { 1440 .driver = {
1442 .name = "mpc52xx-psc-uart", 1441 .name = "mpc52xx-psc-uart",
1442 .owner = THIS_MODULE,
1443 .of_match_table = mpc52xx_uart_of_match,
1443 }, 1444 },
1444}; 1445};
1445 1446
diff --git a/drivers/serial/nwpserial.c b/drivers/serial/nwpserial.c
index e1ab8ec0a4a6..3c02fa96f282 100644
--- a/drivers/serial/nwpserial.c
+++ b/drivers/serial/nwpserial.c
@@ -344,7 +344,7 @@ int nwpserial_register_port(struct uart_port *port)
344 344
345 mutex_lock(&nwpserial_mutex); 345 mutex_lock(&nwpserial_mutex);
346 346
347 dn = to_of_device(port->dev)->node; 347 dn = to_of_device(port->dev)->dev.of_node;
348 if (dn == NULL) 348 if (dn == NULL)
349 goto out; 349 goto out;
350 350
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
index 4abfebdb0fcc..a48d9080f552 100644
--- a/drivers/serial/of_serial.c
+++ b/drivers/serial/of_serial.c
@@ -31,7 +31,7 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev,
31 int type, struct uart_port *port) 31 int type, struct uart_port *port)
32{ 32{
33 struct resource resource; 33 struct resource resource;
34 struct device_node *np = ofdev->node; 34 struct device_node *np = ofdev->dev.of_node;
35 const unsigned int *clk, *spd; 35 const unsigned int *clk, *spd;
36 const u32 *prop; 36 const u32 *prop;
37 int ret, prop_size; 37 int ret, prop_size;
@@ -88,7 +88,7 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev,
88 int port_type; 88 int port_type;
89 int ret; 89 int ret;
90 90
91 if (of_find_property(ofdev->node, "used-by-rtas", NULL)) 91 if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL))
92 return -EBUSY; 92 return -EBUSY;
93 93
94 info = kmalloc(sizeof(*info), GFP_KERNEL); 94 info = kmalloc(sizeof(*info), GFP_KERNEL);
@@ -175,11 +175,13 @@ static struct of_device_id __devinitdata of_platform_serial_table[] = {
175}; 175};
176 176
177static struct of_platform_driver of_platform_serial_driver = { 177static struct of_platform_driver of_platform_serial_driver = {
178 .owner = THIS_MODULE, 178 .driver = {
179 .name = "of_serial", 179 .name = "of_serial",
180 .owner = THIS_MODULE,
181 .of_match_table = of_platform_serial_table,
182 },
180 .probe = of_platform_serial_probe, 183 .probe = of_platform_serial_probe,
181 .remove = of_platform_serial_remove, 184 .remove = of_platform_serial_remove,
182 .match_table = of_platform_serial_table,
183}; 185};
184 186
185static int __init of_platform_serial_init(void) 187static int __init of_platform_serial_init(void)
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index 700e10833bf9..cabbdc7ba583 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -1611,7 +1611,7 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)
1611 /* Iterate the pmz_ports array to find a matching entry 1611 /* Iterate the pmz_ports array to find a matching entry
1612 */ 1612 */
1613 for (i = 0; i < MAX_ZS_PORTS; i++) 1613 for (i = 0; i < MAX_ZS_PORTS; i++)
1614 if (pmz_ports[i].node == mdev->ofdev.node) { 1614 if (pmz_ports[i].node == mdev->ofdev.dev.of_node) {
1615 struct uart_pmac_port *uap = &pmz_ports[i]; 1615 struct uart_pmac_port *uap = &pmz_ports[i];
1616 1616
1617 uap->dev = mdev; 1617 uap->dev = mdev;
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c
index d14cca7fb88d..890f91742962 100644
--- a/drivers/serial/sunhv.c
+++ b/drivers/serial/sunhv.c
@@ -565,7 +565,7 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m
565 if (err) 565 if (err)
566 goto out_free_con_read_page; 566 goto out_free_con_read_page;
567 567
568 sunserial_console_match(&sunhv_console, op->node, 568 sunserial_console_match(&sunhv_console, op->dev.of_node,
569 &sunhv_reg, port->line, false); 569 &sunhv_reg, port->line, false);
570 570
571 err = uart_add_one_port(&sunhv_reg, port); 571 err = uart_add_one_port(&sunhv_reg, port);
@@ -630,8 +630,11 @@ static const struct of_device_id hv_match[] = {
630MODULE_DEVICE_TABLE(of, hv_match); 630MODULE_DEVICE_TABLE(of, hv_match);
631 631
632static struct of_platform_driver hv_driver = { 632static struct of_platform_driver hv_driver = {
633 .name = "hv", 633 .driver = {
634 .match_table = hv_match, 634 .name = "hv",
635 .owner = THIS_MODULE,
636 .of_match_table = hv_match,
637 },
635 .probe = hv_probe, 638 .probe = hv_probe,
636 .remove = __devexit_p(hv_remove), 639 .remove = __devexit_p(hv_remove),
637}; 640};
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index d2e0321049e2..5e81bc6b48b0 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -883,7 +883,7 @@ static int sunsab_console_setup(struct console *con, char *options)
883 printk("Console: ttyS%d (SAB82532)\n", 883 printk("Console: ttyS%d (SAB82532)\n",
884 (sunsab_reg.minor - 64) + con->index); 884 (sunsab_reg.minor - 64) + con->index);
885 885
886 sunserial_console_termios(con, to_of_device(up->port.dev)->node); 886 sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node);
887 887
888 switch (con->cflag & CBAUD) { 888 switch (con->cflag & CBAUD) {
889 case B150: baud = 150; break; 889 case B150: baud = 150; break;
@@ -1026,11 +1026,11 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
1026 if (err) 1026 if (err)
1027 goto out1; 1027 goto out1;
1028 1028
1029 sunserial_console_match(SUNSAB_CONSOLE(), op->node, 1029 sunserial_console_match(SUNSAB_CONSOLE(), op->dev.of_node,
1030 &sunsab_reg, up[0].port.line, 1030 &sunsab_reg, up[0].port.line,
1031 false); 1031 false);
1032 1032
1033 sunserial_console_match(SUNSAB_CONSOLE(), op->node, 1033 sunserial_console_match(SUNSAB_CONSOLE(), op->dev.of_node,
1034 &sunsab_reg, up[1].port.line, 1034 &sunsab_reg, up[1].port.line,
1035 false); 1035 false);
1036 1036
@@ -1093,8 +1093,11 @@ static const struct of_device_id sab_match[] = {
1093MODULE_DEVICE_TABLE(of, sab_match); 1093MODULE_DEVICE_TABLE(of, sab_match);
1094 1094
1095static struct of_platform_driver sab_driver = { 1095static struct of_platform_driver sab_driver = {
1096 .name = "sab", 1096 .driver = {
1097 .match_table = sab_match, 1097 .name = "sab",
1098 .owner = THIS_MODULE,
1099 .of_match_table = sab_match,
1100 },
1098 .probe = sab_probe, 1101 .probe = sab_probe,
1099 .remove = __devexit_p(sab_remove), 1102 .remove = __devexit_p(sab_remove),
1100}; 1103};
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 01f7731e59b8..234459c2f012 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1200,7 +1200,7 @@ static int __devinit sunsu_kbd_ms_init(struct uart_sunsu_port *up)
1200 return -ENODEV; 1200 return -ENODEV;
1201 1201
1202 printk("%s: %s port at %llx, irq %u\n", 1202 printk("%s: %s port at %llx, irq %u\n",
1203 to_of_device(up->port.dev)->node->full_name, 1203 to_of_device(up->port.dev)->dev.of_node->full_name,
1204 (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", 1204 (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse",
1205 (unsigned long long) up->port.mapbase, 1205 (unsigned long long) up->port.mapbase,
1206 up->port.irq); 1206 up->port.irq);
@@ -1352,7 +1352,7 @@ static int __init sunsu_console_setup(struct console *co, char *options)
1352 spin_lock_init(&port->lock); 1352 spin_lock_init(&port->lock);
1353 1353
1354 /* Get firmware console settings. */ 1354 /* Get firmware console settings. */
1355 sunserial_console_termios(co, to_of_device(port->dev)->node); 1355 sunserial_console_termios(co, to_of_device(port->dev)->dev.of_node);
1356 1356
1357 memset(&termios, 0, sizeof(struct ktermios)); 1357 memset(&termios, 0, sizeof(struct ktermios));
1358 termios.c_cflag = co->cflag; 1358 termios.c_cflag = co->cflag;
@@ -1409,7 +1409,7 @@ static enum su_type __devinit su_get_type(struct device_node *dp)
1409static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) 1409static int __devinit su_probe(struct of_device *op, const struct of_device_id *match)
1410{ 1410{
1411 static int inst; 1411 static int inst;
1412 struct device_node *dp = op->node; 1412 struct device_node *dp = op->dev.of_node;
1413 struct uart_sunsu_port *up; 1413 struct uart_sunsu_port *up;
1414 struct resource *rp; 1414 struct resource *rp;
1415 enum su_type type; 1415 enum su_type type;
@@ -1539,8 +1539,11 @@ static const struct of_device_id su_match[] = {
1539MODULE_DEVICE_TABLE(of, su_match); 1539MODULE_DEVICE_TABLE(of, su_match);
1540 1540
1541static struct of_platform_driver su_driver = { 1541static struct of_platform_driver su_driver = {
1542 .name = "su", 1542 .driver = {
1543 .match_table = su_match, 1543 .name = "su",
1544 .owner = THIS_MODULE,
1545 .of_match_table = su_match,
1546 },
1544 .probe = su_probe, 1547 .probe = su_probe,
1545 .remove = __devexit_p(su_remove), 1548 .remove = __devexit_p(su_remove),
1546}; 1549};
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index 978b3cee02d7..f9a24f4ebb34 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -1230,7 +1230,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
1230 (sunzilog_reg.minor - 64) + con->index, con->index); 1230 (sunzilog_reg.minor - 64) + con->index, con->index);
1231 1231
1232 /* Get firmware console settings. */ 1232 /* Get firmware console settings. */
1233 sunserial_console_termios(con, to_of_device(up->port.dev)->node); 1233 sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node);
1234 1234
1235 /* Firmware console speed is limited to 150-->38400 baud so 1235 /* Firmware console speed is limited to 150-->38400 baud so
1236 * this hackish cflag thing is OK. 1236 * this hackish cflag thing is OK.
@@ -1408,7 +1408,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
1408 int keyboard_mouse = 0; 1408 int keyboard_mouse = 0;
1409 int err; 1409 int err;
1410 1410
1411 if (of_find_property(op->node, "keyboard", NULL)) 1411 if (of_find_property(op->dev.of_node, "keyboard", NULL))
1412 keyboard_mouse = 1; 1412 keyboard_mouse = 1;
1413 1413
1414 /* uarts must come before keyboards/mice */ 1414 /* uarts must come before keyboards/mice */
@@ -1465,7 +1465,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
1465 sunzilog_init_hw(&up[1]); 1465 sunzilog_init_hw(&up[1]);
1466 1466
1467 if (!keyboard_mouse) { 1467 if (!keyboard_mouse) {
1468 if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node, 1468 if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node,
1469 &sunzilog_reg, up[0].port.line, 1469 &sunzilog_reg, up[0].port.line,
1470 false)) 1470 false))
1471 up->flags |= SUNZILOG_FLAG_IS_CONS; 1471 up->flags |= SUNZILOG_FLAG_IS_CONS;
@@ -1475,7 +1475,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
1475 rp, sizeof(struct zilog_layout)); 1475 rp, sizeof(struct zilog_layout));
1476 return err; 1476 return err;
1477 } 1477 }
1478 if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node, 1478 if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node,
1479 &sunzilog_reg, up[1].port.line, 1479 &sunzilog_reg, up[1].port.line,
1480 false)) 1480 false))
1481 up->flags |= SUNZILOG_FLAG_IS_CONS; 1481 up->flags |= SUNZILOG_FLAG_IS_CONS;
@@ -1541,8 +1541,11 @@ static const struct of_device_id zs_match[] = {
1541MODULE_DEVICE_TABLE(of, zs_match); 1541MODULE_DEVICE_TABLE(of, zs_match);
1542 1542
1543static struct of_platform_driver zs_driver = { 1543static struct of_platform_driver zs_driver = {
1544 .name = "zs", 1544 .driver = {
1545 .match_table = zs_match, 1545 .name = "zs",
1546 .owner = THIS_MODULE,
1547 .of_match_table = zs_match,
1548 },
1546 .probe = zs_probe, 1549 .probe = zs_probe,
1547 .remove = __devexit_p(zs_remove), 1550 .remove = __devexit_p(zs_remove),
1548}; 1551};
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index e6639a95d276..8acccd564378 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -591,15 +591,15 @@ ulite_of_probe(struct of_device *op, const struct of_device_id *match)
591 591
592 dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match); 592 dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match);
593 593
594 rc = of_address_to_resource(op->node, 0, &res); 594 rc = of_address_to_resource(op->dev.of_node, 0, &res);
595 if (rc) { 595 if (rc) {
596 dev_err(&op->dev, "invalid address\n"); 596 dev_err(&op->dev, "invalid address\n");
597 return rc; 597 return rc;
598 } 598 }
599 599
600 irq = irq_of_parse_and_map(op->node, 0); 600 irq = irq_of_parse_and_map(op->dev.of_node, 0);
601 601
602 id = of_get_property(op->node, "port-number", NULL); 602 id = of_get_property(op->dev.of_node, "port-number", NULL);
603 603
604 return ulite_assign(&op->dev, id ? *id : -1, res.start, irq); 604 return ulite_assign(&op->dev, id ? *id : -1, res.start, irq);
605} 605}
@@ -610,13 +610,12 @@ static int __devexit ulite_of_remove(struct of_device *op)
610} 610}
611 611
612static struct of_platform_driver ulite_of_driver = { 612static struct of_platform_driver ulite_of_driver = {
613 .owner = THIS_MODULE,
614 .name = "uartlite",
615 .match_table = ulite_of_match,
616 .probe = ulite_of_probe, 613 .probe = ulite_of_probe,
617 .remove = __devexit_p(ulite_of_remove), 614 .remove = __devexit_p(ulite_of_remove),
618 .driver = { 615 .driver = {
619 .name = "uartlite", 616 .name = "uartlite",
617 .owner = THIS_MODULE,
618 .of_match_table = ulite_of_match,
620 }, 619 },
621}; 620};
622 621
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c
index 074904912f64..907b06f5c447 100644
--- a/drivers/serial/ucc_uart.c
+++ b/drivers/serial/ucc_uart.c
@@ -1197,7 +1197,7 @@ static void uart_firmware_cont(const struct firmware *fw, void *context)
1197static int ucc_uart_probe(struct of_device *ofdev, 1197static int ucc_uart_probe(struct of_device *ofdev,
1198 const struct of_device_id *match) 1198 const struct of_device_id *match)
1199{ 1199{
1200 struct device_node *np = ofdev->node; 1200 struct device_node *np = ofdev->dev.of_node;
1201 const unsigned int *iprop; /* Integer OF properties */ 1201 const unsigned int *iprop; /* Integer OF properties */
1202 const char *sprop; /* String OF properties */ 1202 const char *sprop; /* String OF properties */
1203 struct uart_qe_port *qe_port = NULL; 1203 struct uart_qe_port *qe_port = NULL;
@@ -1486,9 +1486,11 @@ static struct of_device_id ucc_uart_match[] = {
1486MODULE_DEVICE_TABLE(of, ucc_uart_match); 1486MODULE_DEVICE_TABLE(of, ucc_uart_match);
1487 1487
1488static struct of_platform_driver ucc_uart_of_driver = { 1488static struct of_platform_driver ucc_uart_of_driver = {
1489 .owner = THIS_MODULE, 1489 .driver = {
1490 .name = "ucc_uart", 1490 .name = "ucc_uart",
1491 .match_table = ucc_uart_match, 1491 .owner = THIS_MODULE,
1492 .of_match_table = ucc_uart_match,
1493 },
1492 .probe = ucc_uart_probe, 1494 .probe = ucc_uart_probe,
1493 .remove = ucc_uart_remove, 1495 .remove = ucc_uart_remove,
1494}; 1496};