diff options
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 65c4ee3628c4..69e2833bd460 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -616,7 +616,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) | |||
616 | continue; | 616 | continue; |
617 | 617 | ||
618 | board_cfg = &ch->cfg.board_cfg; | 618 | board_cfg = &ch->cfg.board_cfg; |
619 | if (try_module_get(board_cfg->owner) && board_cfg->display_on) { | 619 | if (board_cfg->display_on && try_module_get(board_cfg->owner)) { |
620 | board_cfg->display_on(board_cfg->board_data, ch->info); | 620 | board_cfg->display_on(board_cfg->board_data, ch->info); |
621 | module_put(board_cfg->owner); | 621 | module_put(board_cfg->owner); |
622 | } | 622 | } |
@@ -661,7 +661,7 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv) | |||
661 | } | 661 | } |
662 | 662 | ||
663 | board_cfg = &ch->cfg.board_cfg; | 663 | board_cfg = &ch->cfg.board_cfg; |
664 | if (try_module_get(board_cfg->owner) && board_cfg->display_off) { | 664 | if (board_cfg->display_off && try_module_get(board_cfg->owner)) { |
665 | board_cfg->display_off(board_cfg->board_data); | 665 | board_cfg->display_off(board_cfg->board_data); |
666 | module_put(board_cfg->owner); | 666 | module_put(board_cfg->owner); |
667 | } | 667 | } |
@@ -1228,7 +1228,7 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb, | |||
1228 | 1228 | ||
1229 | switch(action) { | 1229 | switch(action) { |
1230 | case FB_EVENT_SUSPEND: | 1230 | case FB_EVENT_SUSPEND: |
1231 | if (try_module_get(board_cfg->owner) && board_cfg->display_off) { | 1231 | if (board_cfg->display_off && try_module_get(board_cfg->owner)) { |
1232 | board_cfg->display_off(board_cfg->board_data); | 1232 | board_cfg->display_off(board_cfg->board_data); |
1233 | module_put(board_cfg->owner); | 1233 | module_put(board_cfg->owner); |
1234 | } | 1234 | } |
@@ -1241,7 +1241,7 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb, | |||
1241 | mutex_unlock(&ch->open_lock); | 1241 | mutex_unlock(&ch->open_lock); |
1242 | 1242 | ||
1243 | /* HDMI must be enabled before LCDC configuration */ | 1243 | /* HDMI must be enabled before LCDC configuration */ |
1244 | if (try_module_get(board_cfg->owner) && board_cfg->display_on) { | 1244 | if (board_cfg->display_on && try_module_get(board_cfg->owner)) { |
1245 | board_cfg->display_on(board_cfg->board_data, info); | 1245 | board_cfg->display_on(board_cfg->board_data, info); |
1246 | module_put(board_cfg->owner); | 1246 | module_put(board_cfg->owner); |
1247 | } | 1247 | } |