Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325749
b: refs/heads/master
c: ce2f08d
h: refs/heads/master
i:
  325747: 0738649
v: v3
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Sep 10, 2012
1 parent c99a6c7 commit e874fab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e36851d0fa94b0f7802b3cc80406dbd3ef4f2f16
refs/heads/master: ce2f08ded291188b684e3d2e9940132514ada0a9
20 changes: 13 additions & 7 deletions trunk/drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static int serial_omap_get_context_loss_count(struct uart_omap_port *up)
{
struct omap_uart_port_info *pdata = up->dev->platform_data;

if (!pdata->get_context_loss_count)
if (!pdata || !pdata->get_context_loss_count)
return 0;

return pdata->get_context_loss_count(up->dev);
Expand All @@ -153,24 +153,30 @@ static void serial_omap_set_forceidle(struct uart_omap_port *up)
{
struct omap_uart_port_info *pdata = up->dev->platform_data;

if (pdata->set_forceidle)
pdata->set_forceidle(up->dev);
if (!pdata || !pdata->set_forceidle)
return;

pdata->set_forceidle(up->dev);
}

static void serial_omap_set_noidle(struct uart_omap_port *up)
{
struct omap_uart_port_info *pdata = up->dev->platform_data;

if (pdata->set_noidle)
pdata->set_noidle(up->dev);
if (!pdata || !pdata->set_noidle)
return;

pdata->set_noidle(up->dev);
}

static void serial_omap_enable_wakeup(struct uart_omap_port *up, bool enable)
{
struct omap_uart_port_info *pdata = up->dev->platform_data;

if (pdata->enable_wakeup)
pdata->enable_wakeup(up->dev, enable);
if (!pdata || !pdata->enable_wakeup)
return;

pdata->enable_wakeup(up->dev, enable);
}

/*
Expand Down

0 comments on commit e874fab

Please sign in to comment.