aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index d3299ff543b..986346dbe05 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1691,17 +1691,6 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv,
1691 info->pseudo_palette = &ch->pseudo_palette; 1691 info->pseudo_palette = &ch->pseudo_palette;
1692 info->flags = FBINFO_FLAG_DEFAULT; 1692 info->flags = FBINFO_FLAG_DEFAULT;
1693 1693
1694 if (cfg->tx_dev) {
1695 if (!cfg->tx_dev->dev.driver ||
1696 !try_module_get(cfg->tx_dev->dev.driver->owner)) {
1697 dev_warn(priv->dev,
1698 "unable to get transmitter device\n");
1699 return -EINVAL;
1700 }
1701 ch->tx_dev = platform_get_drvdata(cfg->tx_dev);
1702 ch->tx_dev->lcdc = ch;
1703 }
1704
1705 /* Iterate through the modes to validate them and find the highest 1694 /* Iterate through the modes to validate them and find the highest
1706 * resolution. 1695 * resolution.
1707 */ 1696 */
@@ -1742,6 +1731,19 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv,
1742 1731
1743 fb_videomode_to_modelist(mode, num_cfg, &info->modelist); 1732 fb_videomode_to_modelist(mode, num_cfg, &info->modelist);
1744 1733
1734 /* Initialize the transmitter device if present. */
1735 if (cfg->tx_dev) {
1736 if (!cfg->tx_dev->dev.driver ||
1737 !try_module_get(cfg->tx_dev->dev.driver->owner)) {
1738 dev_warn(priv->dev,
1739 "unable to get transmitter device\n");
1740 return -EINVAL;
1741 }
1742 ch->tx_dev = platform_get_drvdata(cfg->tx_dev);
1743 ch->tx_dev->lcdc = ch;
1744 ch->tx_dev->def_mode = *mode;
1745 }
1746
1745 /* Initialize variable screen information using the first mode as 1747 /* Initialize variable screen information using the first mode as
1746 * default. The default Y virtual resolution is twice the panel size to 1748 * default. The default Y virtual resolution is twice the panel size to
1747 * allow for double-buffering. 1749 * allow for double-buffering.