diff options
Diffstat (limited to 'drivers/serial/sunhv.c')
-rw-r--r-- | drivers/serial/sunhv.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index 1df5325faab2..c9014868297d 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c | |||
@@ -184,8 +184,8 @@ static struct tty_struct *receive_chars(struct uart_port *port) | |||
184 | { | 184 | { |
185 | struct tty_struct *tty = NULL; | 185 | struct tty_struct *tty = NULL; |
186 | 186 | ||
187 | if (port->info != NULL) /* Unopened serial console */ | 187 | if (port->state != NULL) /* Unopened serial console */ |
188 | tty = port->info->port.tty; | 188 | tty = port->state->port.tty; |
189 | 189 | ||
190 | if (sunhv_ops->receive_chars(port, tty)) | 190 | if (sunhv_ops->receive_chars(port, tty)) |
191 | sun_do_break(); | 191 | sun_do_break(); |
@@ -197,10 +197,10 @@ static void transmit_chars(struct uart_port *port) | |||
197 | { | 197 | { |
198 | struct circ_buf *xmit; | 198 | struct circ_buf *xmit; |
199 | 199 | ||
200 | if (!port->info) | 200 | if (!port->state) |
201 | return; | 201 | return; |
202 | 202 | ||
203 | xmit = &port->info->xmit; | 203 | xmit = &port->state->xmit; |
204 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) | 204 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) |
205 | return; | 205 | return; |
206 | 206 | ||
@@ -519,13 +519,13 @@ static struct console sunhv_console = { | |||
519 | .data = &sunhv_reg, | 519 | .data = &sunhv_reg, |
520 | }; | 520 | }; |
521 | 521 | ||
522 | static int __devinit hv_probe(struct of_device *op, const struct of_device_id *match) | 522 | static int __devinit hv_probe(struct platform_device *op, const struct of_device_id *match) |
523 | { | 523 | { |
524 | struct uart_port *port; | 524 | struct uart_port *port; |
525 | unsigned long minor; | 525 | unsigned long minor; |
526 | int err; | 526 | int err; |
527 | 527 | ||
528 | if (op->irqs[0] == 0xffffffff) | 528 | if (op->archdata.irqs[0] == 0xffffffff) |
529 | return -ENODEV; | 529 | return -ENODEV; |
530 | 530 | ||
531 | port = kzalloc(sizeof(struct uart_port), GFP_KERNEL); | 531 | port = kzalloc(sizeof(struct uart_port), GFP_KERNEL); |
@@ -557,7 +557,7 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m | |||
557 | 557 | ||
558 | port->membase = (unsigned char __iomem *) __pa(port); | 558 | port->membase = (unsigned char __iomem *) __pa(port); |
559 | 559 | ||
560 | port->irq = op->irqs[0]; | 560 | port->irq = op->archdata.irqs[0]; |
561 | 561 | ||
562 | port->dev = &op->dev; | 562 | port->dev = &op->dev; |
563 | 563 | ||
@@ -565,8 +565,8 @@ 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); | 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); |
572 | if (err) | 572 | if (err) |
@@ -598,7 +598,7 @@ out_free_port: | |||
598 | return err; | 598 | return err; |
599 | } | 599 | } |
600 | 600 | ||
601 | static int __devexit hv_remove(struct of_device *dev) | 601 | static int __devexit hv_remove(struct platform_device *dev) |
602 | { | 602 | { |
603 | struct uart_port *port = dev_get_drvdata(&dev->dev); | 603 | struct uart_port *port = dev_get_drvdata(&dev->dev); |
604 | 604 | ||
@@ -630,8 +630,11 @@ static const struct of_device_id hv_match[] = { | |||
630 | MODULE_DEVICE_TABLE(of, hv_match); | 630 | MODULE_DEVICE_TABLE(of, hv_match); |
631 | 631 | ||
632 | static struct of_platform_driver hv_driver = { | 632 | static 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 | }; |
@@ -641,12 +644,12 @@ static int __init sunhv_init(void) | |||
641 | if (tlb_type != hypervisor) | 644 | if (tlb_type != hypervisor) |
642 | return -ENODEV; | 645 | return -ENODEV; |
643 | 646 | ||
644 | return of_register_driver(&hv_driver, &of_bus_type); | 647 | return of_register_platform_driver(&hv_driver); |
645 | } | 648 | } |
646 | 649 | ||
647 | static void __exit sunhv_exit(void) | 650 | static void __exit sunhv_exit(void) |
648 | { | 651 | { |
649 | of_unregister_driver(&hv_driver); | 652 | of_unregister_platform_driver(&hv_driver); |
650 | } | 653 | } |
651 | 654 | ||
652 | module_init(sunhv_init); | 655 | module_init(sunhv_init); |