···24542454 .resume = serial8250_resume,24552455 .driver = {24562456 .name = "serial8250",24572457+ .owner = THIS_MODULE,24572458 },24582459};24592460···25952594 if (ret)25962595 goto out;2597259625982598- serial8250_isa_devs = platform_device_register_simple("serial8250",25992599- PLAT8250_DEV_LEGACY, NULL, 0);26002600- if (IS_ERR(serial8250_isa_devs)) {26012601- ret = PTR_ERR(serial8250_isa_devs);26022602- goto unreg;25972597+ ret = platform_driver_register(&serial8250_isa_driver);25982598+ if (ret)25992599+ goto unreg_uart_drv;26002600+26012601+ serial8250_isa_devs = platform_device_alloc("serial8250",26022602+ PLAT8250_DEV_LEGACY);26032603+ if (!serial8250_isa_devs) {26042604+ ret = -ENOMEM;26052605+ goto unreg_plat_drv;26032606 }26072607+26082608+ ret = platform_device_add(serial8250_isa_devs);26092609+ if (ret)26102610+ goto put_dev;2604261126052612 serial8250_register_ports(&serial8250_reg, &serial8250_isa_devs->dev);2606261326072607- ret = platform_driver_register(&serial8250_isa_driver);26082608- if (ret == 0)26092609- goto out;26142614+ goto out;2610261526112611- platform_device_unregister(serial8250_isa_devs);26122612- unreg:26162616+ put_dev:26172617+ platform_device_put(serial8250_isa_devs);26182618+ unreg_plat_drv:26192619+ platform_driver_unregister(&serial8250_isa_driver);26202620+ unreg_uart_drv:26132621 uart_unregister_driver(&serial8250_reg);26142622 out:26152623 return ret;
+1-1
drivers/serial/Kconfig
···847847848848config SERIAL_M32R_PLDSIO849849 bool "M32R SIO I/F on a PLD"850850- depends on SERIAL_M32R_SIO=y && (PLAT_OPSPUT || PALT_USRV || PLAT_M32700UT)850850+ depends on SERIAL_M32R_SIO=y && (PLAT_OPSPUT || PLAT_USRV || PLAT_M32700UT)851851 default n852852 help853853 Say Y here if you want to use the M32R serial controller
+4-5
drivers/serial/pmac_zilog.c
···6969#include <asm/pmac_feature.h>7070#include <asm/dbdma.h>7171#include <asm/macio.h>7272-#include <asm/semaphore.h>73727473#if defined (CONFIG_SERIAL_PMACZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)7574#define SUPPORT_SYSRQ···15921593 state = pmz_uart_reg.state + uap->port.line;1593159415941595 mutex_lock(&pmz_irq_mutex);15951595- down(&state->sem);15961596+ mutex_lock(&state->mutex);1596159715971598 spin_lock_irqsave(&uap->port.lock, flags);15981599···16231624 /* Shut the chip down */16241625 pmz_set_scc_power(uap, 0);1625162616261626- up(&state->sem);16271627+ mutex_unlock(&state->mutex);16271628 mutex_unlock(&pmz_irq_mutex);1628162916291630 pmz_debug("suspend, switching complete\n");···16521653 state = pmz_uart_reg.state + uap->port.line;1653165416541655 mutex_lock(&pmz_irq_mutex);16551655- down(&state->sem);16561656+ mutex_lock(&state->mutex);1656165716571658 spin_lock_irqsave(&uap->port.lock, flags);16581659 if (!ZS_IS_OPEN(uap) && !ZS_IS_CONS(uap)) {···16841685 }1685168616861687 bail:16871687- up(&state->sem);16881688+ mutex_unlock(&state->mutex);16881689 mutex_unlock(&pmz_irq_mutex);1689169016901691 /* Right now, we deal with delay by blocking here, I'll be