]> git.baikalelectronics.ru Git - kernel.git/commit
OMAPDSS: alloc dssdevs dynamically
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 10 Sep 2012 10:58:29 +0000 (13:58 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 18 Sep 2012 13:15:05 +0000 (16:15 +0300)
commite541c0ca5e760630beb50547254042b0ab26ed1a
treea5b99b98eb685414b5ff87233da5556ce80ad2f6
parent2d7b462b9bc9343e1f0a7ce487882afec9fa2685
OMAPDSS: alloc dssdevs dynamically

We currently create omap_dss_devices statically in board files, and use
those devices directly in the omapdss driver. This model prevents us
from having the platform data (which the dssdevs in board files
practically are) as read-only, and it's also different than what we will
use with device tree.

This patch changes the model to be in line with DT model: we allocate
the dssdevs dynamically, and initialize them according to the data in
the board file's dssdev (basically we memcopy the dssdev fields).

The allocation and registration is done in the following steps in the
output drivers:

- Use dss_alloc_and_init_device to allocate and initialize the device.
  The function uses kalloc and device_initialize to accomplish this.
- Call dss_copy_device_pdata to copy the data from the board file's
  dssdev
- Use dss_add_device to register the device.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/core.c
drivers/video/omap2/dss/dpi.c
drivers/video/omap2/dss/dsi.c
drivers/video/omap2/dss/dss.h
drivers/video/omap2/dss/hdmi.c
drivers/video/omap2/dss/rfbi.c
drivers/video/omap2/dss/sdi.c
drivers/video/omap2/dss/venc.c