Thread (3 messages) flat view 3 messages, 3 authors, 2012-09-05

Re: [PATCH V3 1/2] drm/exynos: add platform_device_id table and driver data for exynos5 drm fimd

From: Tomasz Figa <hidden>
Date: 2012-09-05 07:52:54
Also in: dri-devel

Possibly related (same subject, not in this thread)

Hi Leela,

See my comments inline.

On Thursday 16 of August 2012 12:08:08 Leela Krishna Amudala wrote:
+enum fimd_version_type {
+	VERSION_8, /* FIMD_VERSION8 */
+};
+
+struct drm_fimd_driver_data {
+	enum fimd_version_type fimd_ver;
+};
+
+struct drm_fimd_driver_data exynos5_drm_fimd_driver_data = {
+	.fimd_ver = VERSION_8,
+};
I think that the approach with timing_base, as suggested by Joonyoung Shim, 
would be much cleaner.
+static struct platform_device_id exynos_drm_fimd_driver_ids[] = {
+	{
+		.name		= "exynos4-fb",
+	}, {
+		.name		= "exynos5-drm-fimd",
+		.driver_data	= (unsigned long)&exynos5_drm_fimd_driver_data,
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(platform, exynos_drm_fimd_driver_ids);
If I see correctly, this will crash on a null pointer dereference on 
Exynos4 without DT, because of NULL driver_data.

P.S. I think you should CC linux-arm-kernel and linux-samsung-soc lists 
when submitting patches related to ARM and Samsung SoCs.

Best regards,
-- 
Tomasz Figa
Samsung Poland R&D Center
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help