| .. | .. |
|---|
| 39 | 39 | break; |
|---|
| 40 | 40 | case UART_IER: /* IER @ 0x04 */ |
|---|
| 41 | 41 | value &= 0x0f; /* only 4 valid bits - not Xscale */ |
|---|
| 42 | | - /* fall-through */ |
|---|
| 42 | + fallthrough; |
|---|
| 43 | 43 | case UART_DLL_EM: /* DLL @ 0x24 (+9) */ |
|---|
| 44 | 44 | case UART_DLM_EM: /* DLM @ 0x28 (+9) */ |
|---|
| 45 | 45 | writel(value, p->membase + (offset << 2)); |
|---|
| .. | .. |
|---|
| 78 | 78 | |
|---|
| 79 | 79 | static int serial8250_em_probe(struct platform_device *pdev) |
|---|
| 80 | 80 | { |
|---|
| 81 | | - struct resource *regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 82 | | - struct resource *irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
|---|
| 83 | 81 | struct serial8250_em_priv *priv; |
|---|
| 84 | 82 | struct uart_8250_port up; |
|---|
| 85 | | - int ret; |
|---|
| 83 | + struct resource *regs; |
|---|
| 84 | + int irq, ret; |
|---|
| 86 | 85 | |
|---|
| 87 | | - if (!regs || !irq) { |
|---|
| 88 | | - dev_err(&pdev->dev, "missing registers or irq\n"); |
|---|
| 86 | + irq = platform_get_irq(pdev, 0); |
|---|
| 87 | + if (irq < 0) |
|---|
| 88 | + return irq; |
|---|
| 89 | + |
|---|
| 90 | + regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 91 | + if (!regs) { |
|---|
| 92 | + dev_err(&pdev->dev, "missing registers\n"); |
|---|
| 89 | 93 | return -EINVAL; |
|---|
| 90 | 94 | } |
|---|
| 91 | 95 | |
|---|
| .. | .. |
|---|
| 101 | 105 | |
|---|
| 102 | 106 | memset(&up, 0, sizeof(up)); |
|---|
| 103 | 107 | up.port.mapbase = regs->start; |
|---|
| 104 | | - up.port.irq = irq->start; |
|---|
| 105 | | - up.port.type = PORT_UNKNOWN; |
|---|
| 106 | | - up.port.flags = UPF_BOOT_AUTOCONF | UPF_FIXED_PORT | UPF_IOREMAP; |
|---|
| 108 | + up.port.irq = irq; |
|---|
| 109 | + up.port.type = PORT_16750; |
|---|
| 110 | + up.port.flags = UPF_FIXED_PORT | UPF_IOREMAP | UPF_FIXED_TYPE; |
|---|
| 107 | 111 | up.port.dev = &pdev->dev; |
|---|
| 108 | 112 | up.port.private_data = priv; |
|---|
| 109 | 113 | |
|---|