diff options
Diffstat (limited to 'drivers/video/stm32_ltdc.c')
-rw-r--r-- | drivers/video/stm32_ltdc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/video/stm32_ltdc.c b/drivers/video/stm32_ltdc.c index 645c20b554..d1c36b1f45 100644 --- a/drivers/video/stm32_ltdc.c +++ b/drivers/video/stm32_ltdc.c @@ -21,7 +21,7 @@ struct ltdc_hw { void __iomem *regs; - struct device_d *dev; + struct device *dev; struct clk *pclk; bool claimed; }; @@ -98,7 +98,7 @@ static void ltdc_set_mode(struct ltdc_fb *priv, val |= GCR_HSPOL; if (mode->sync & FB_SYNC_VERT_HIGH_ACT) val |= GCR_VSPOL; - if (mode->display_flags & DISPLAY_FLAGS_DE_HIGH) + if (mode->display_flags & DISPLAY_FLAGS_DE_LOW) val |= GCR_DEPOL; if (mode->display_flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) val |= GCR_PCPOL; @@ -252,7 +252,7 @@ static struct fb_ops ltdc_ops = { .fb_disable = ltdc_disable, }; -static int ltdc_probe(struct device_d *dev) +static int ltdc_probe(struct device *dev) { struct device_node *np; struct resource *iores; @@ -273,7 +273,7 @@ static int ltdc_probe(struct device_d *dev) return PTR_ERR(hw->pclk); } - for_each_available_child_of_node(dev->device_node, np) { + for_each_available_child_of_node(dev->of_node, np) { struct ltdc_fb *priv; struct of_endpoint ep; struct fb_info *info; @@ -285,12 +285,12 @@ static int ltdc_probe(struct device_d *dev) if (ret) return ret; - dev_dbg(hw->dev, "register vpl for %s\n", np->full_name); + dev_dbg(hw->dev, "register vpl for %pOF\n", np); priv = xzalloc(sizeof(*priv)); priv->hw = hw; priv->id = ep.id; - priv->vpl.node = dev->device_node; + priv->vpl.node = dev->of_node; ret = vpl_register(&priv->vpl); if (ret) @@ -327,8 +327,9 @@ static __maybe_unused struct of_device_id ltdc_ids[] = { { .compatible = "st,stm32-ltdc" }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, ltdc_ids); -static struct driver_d ltdc_driver = { +static struct driver ltdc_driver = { .name = "stm32-ltdc", .probe = ltdc_probe, .of_compatible = DRV_OF_COMPAT(ltdc_ids), |