diff options
Diffstat (limited to 'drivers/net/irda/sh_sir.c')
-rw-r--r-- | drivers/net/irda/sh_sir.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c index 0745581c4b5e..5c5f99d50341 100644 --- a/drivers/net/irda/sh_sir.c +++ b/drivers/net/irda/sh_sir.c | |||
@@ -646,8 +646,10 @@ static int sh_sir_open(struct net_device *ndev) | |||
646 | sh_sir_set_baudrate(self, 9600); | 646 | sh_sir_set_baudrate(self, 9600); |
647 | 647 | ||
648 | self->irlap = irlap_open(ndev, &self->qos, DRIVER_NAME); | 648 | self->irlap = irlap_open(ndev, &self->qos, DRIVER_NAME); |
649 | if (!self->irlap) | 649 | if (!self->irlap) { |
650 | err = -ENODEV; | ||
650 | goto open_err; | 651 | goto open_err; |
652 | } | ||
651 | 653 | ||
652 | /* | 654 | /* |
653 | * Now enable the interrupt then start the queue | 655 | * Now enable the interrupt then start the queue |
@@ -707,7 +709,6 @@ static int __devinit sh_sir_probe(struct platform_device *pdev) | |||
707 | struct sh_sir_self *self; | 709 | struct sh_sir_self *self; |
708 | struct resource *res; | 710 | struct resource *res; |
709 | char clk_name[8]; | 711 | char clk_name[8]; |
710 | void __iomem *base; | ||
711 | unsigned int irq; | 712 | unsigned int irq; |
712 | int err = -ENOMEM; | 713 | int err = -ENOMEM; |
713 | 714 | ||
@@ -722,14 +723,14 @@ static int __devinit sh_sir_probe(struct platform_device *pdev) | |||
722 | if (!ndev) | 723 | if (!ndev) |
723 | goto exit; | 724 | goto exit; |
724 | 725 | ||
725 | base = ioremap_nocache(res->start, resource_size(res)); | 726 | self = netdev_priv(ndev); |
726 | if (!base) { | 727 | self->membase = ioremap_nocache(res->start, resource_size(res)); |
728 | if (!self->membase) { | ||
727 | err = -ENXIO; | 729 | err = -ENXIO; |
728 | dev_err(&pdev->dev, "Unable to ioremap.\n"); | 730 | dev_err(&pdev->dev, "Unable to ioremap.\n"); |
729 | goto err_mem_1; | 731 | goto err_mem_1; |
730 | } | 732 | } |
731 | 733 | ||
732 | self = netdev_priv(ndev); | ||
733 | err = sh_sir_init_iobuf(self, IRDA_SKB_MAX_MTU, IRDA_SIR_MAX_FRAME); | 734 | err = sh_sir_init_iobuf(self, IRDA_SKB_MAX_MTU, IRDA_SIR_MAX_FRAME); |
734 | if (err) | 735 | if (err) |
735 | goto err_mem_2; | 736 | goto err_mem_2; |
@@ -746,7 +747,6 @@ static int __devinit sh_sir_probe(struct platform_device *pdev) | |||
746 | ndev->netdev_ops = &sh_sir_ndo; | 747 | ndev->netdev_ops = &sh_sir_ndo; |
747 | ndev->irq = irq; | 748 | ndev->irq = irq; |
748 | 749 | ||
749 | self->membase = base; | ||
750 | self->ndev = ndev; | 750 | self->ndev = ndev; |
751 | self->qos.baud_rate.bits &= IR_9600; /* FIXME */ | 751 | self->qos.baud_rate.bits &= IR_9600; /* FIXME */ |
752 | self->qos.min_turn_time.bits = 1; /* 10 ms or more */ | 752 | self->qos.min_turn_time.bits = 1; /* 10 ms or more */ |