mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
[PATCH] ARM: 2785/1: S3C24XX - serial calls request_irq() with IRQs disabled
Patch from Ben Dooks The request_irq() function is called by s3c24xx uart driver with the local IRQs disabled. The request_irq() function can allocate memory via kmalloc(), and this may sleep causing a warning about sleeping in an invalid context. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
e9dea0c65d
commit
75f631dc45
1 changed files with 0 additions and 5 deletions
|
@ -522,14 +522,11 @@ static void s3c24xx_serial_shutdown(struct uart_port *port)
|
||||||
static int s3c24xx_serial_startup(struct uart_port *port)
|
static int s3c24xx_serial_startup(struct uart_port *port)
|
||||||
{
|
{
|
||||||
struct s3c24xx_uart_port *ourport = to_ourport(port);
|
struct s3c24xx_uart_port *ourport = to_ourport(port);
|
||||||
unsigned long flags;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n",
|
dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n",
|
||||||
port->mapbase, port->membase);
|
port->mapbase, port->membase);
|
||||||
|
|
||||||
local_irq_save(flags);
|
|
||||||
|
|
||||||
rx_enabled(port) = 1;
|
rx_enabled(port) = 1;
|
||||||
|
|
||||||
ret = request_irq(RX_IRQ(port),
|
ret = request_irq(RX_IRQ(port),
|
||||||
|
@ -563,12 +560,10 @@ static int s3c24xx_serial_startup(struct uart_port *port)
|
||||||
/* the port reset code should have done the correct
|
/* the port reset code should have done the correct
|
||||||
* register setup for the port controls */
|
* register setup for the port controls */
|
||||||
|
|
||||||
local_irq_restore(flags);
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
s3c24xx_serial_shutdown(port);
|
s3c24xx_serial_shutdown(port);
|
||||||
local_irq_restore(flags);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue