Skip to content

Commit

Permalink
drm/sti: Build monolithic driver
Browse files Browse the repository at this point in the history
There's no use building the individual drivers as separate modules
because they are all only useful if combined into a single DRM/KMS
device.

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
  • Loading branch information
Thierry Reding authored and Vincent Abriou committed Nov 3, 2015
1 parent 2388693 commit dcec16e
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 30 deletions.
21 changes: 9 additions & 12 deletions drivers/gpu/drm/sti/Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
sticompositor-y := \
sti-drm-y := \
sti_mixer.o \
sti_gdp.o \
sti_vid.o \
sti_cursor.o \
sti_compositor.o \
sti_crtc.o \
sti_plane.o

stihdmi-y := sti_hdmi.o \
sti_plane.o \
sti_crtc.o \
sti_plane.o \
sti_hdmi.o \
sti_hdmi_tx3g0c55phy.o \
sti_hdmi_tx3g4c28phy.o \

stidvo-y := sti_dvo.o \
sti_awg_utils.o

obj-$(CONFIG_DRM_STI) = \
sti_dvo.o \
sti_awg_utils.o \
sti_vtg.o \
sti_vtac.o \
stihdmi.o \
sti_hda.o \
sti_tvout.o \
sticompositor.o \
sti_hqvdp.o \
stidvo.o \
sti_drv.o

obj-$(CONFIG_DRM_STI) = sti-drm.o
4 changes: 1 addition & 3 deletions drivers/gpu/drm/sti/sti_compositor.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static int sti_compositor_remove(struct platform_device *pdev)
return 0;
}

static struct platform_driver sti_compositor_driver = {
struct platform_driver sti_compositor_driver = {
.driver = {
.name = "sti-compositor",
.of_match_table = compositor_of_match,
Expand All @@ -272,8 +272,6 @@ static struct platform_driver sti_compositor_driver = {
.remove = sti_compositor_remove,
};

module_platform_driver(sti_compositor_driver);

MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
MODULE_LICENSE("GPL");
24 changes: 23 additions & 1 deletion drivers/gpu/drm/sti/sti_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,29 @@ static struct platform_driver sti_platform_driver = {
},
};

module_platform_driver(sti_platform_driver);
static struct platform_driver * const drivers[] = {
&sti_tvout_driver,
&sti_vtac_driver,
&sti_hqvdp_driver,
&sti_hdmi_driver,
&sti_hda_driver,
&sti_dvo_driver,
&sti_vtg_driver,
&sti_compositor_driver,
&sti_platform_driver,
};

static int sti_drm_init(void)
{
return platform_register_drivers(drivers, ARRAY_SIZE(drivers));
}
module_init(sti_drm_init);

static void sti_drm_exit(void)
{
platform_unregister_drivers(drivers, ARRAY_SIZE(drivers));
}
module_exit(sti_drm_exit);

MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
Expand Down
9 changes: 9 additions & 0 deletions drivers/gpu/drm/sti/sti_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ struct sti_private {
} commit;
};

extern struct platform_driver sti_tvout_driver;
extern struct platform_driver sti_vtac_driver;
extern struct platform_driver sti_hqvdp_driver;
extern struct platform_driver sti_hdmi_driver;
extern struct platform_driver sti_hda_driver;
extern struct platform_driver sti_dvo_driver;
extern struct platform_driver sti_vtg_driver;
extern struct platform_driver sti_compositor_driver;

#endif
2 changes: 0 additions & 2 deletions drivers/gpu/drm/sti/sti_dvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,6 @@ struct platform_driver sti_dvo_driver = {
.remove = sti_dvo_remove,
};

module_platform_driver(sti_dvo_driver);

MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
MODULE_LICENSE("GPL");
2 changes: 0 additions & 2 deletions drivers/gpu/drm/sti/sti_hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,8 +785,6 @@ struct platform_driver sti_hda_driver = {
.remove = sti_hda_remove,
};

module_platform_driver(sti_hda_driver);

MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
MODULE_LICENSE("GPL");
2 changes: 0 additions & 2 deletions drivers/gpu/drm/sti/sti_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,6 @@ struct platform_driver sti_hdmi_driver = {
.remove = sti_hdmi_remove,
};

module_platform_driver(sti_hdmi_driver);

MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
MODULE_LICENSE("GPL");
2 changes: 0 additions & 2 deletions drivers/gpu/drm/sti/sti_hqvdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,8 +1090,6 @@ struct platform_driver sti_hqvdp_driver = {
.remove = sti_hqvdp_remove,
};

module_platform_driver(sti_hqvdp_driver);

MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
MODULE_LICENSE("GPL");
2 changes: 0 additions & 2 deletions drivers/gpu/drm/sti/sti_tvout.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,6 @@ struct platform_driver sti_tvout_driver = {
.remove = sti_tvout_remove,
};

module_platform_driver(sti_tvout_driver);

MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
MODULE_LICENSE("GPL");
2 changes: 0 additions & 2 deletions drivers/gpu/drm/sti/sti_vtac.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ struct platform_driver sti_vtac_driver = {
.remove = sti_vtac_remove,
};

module_platform_driver(sti_vtac_driver);

MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
MODULE_LICENSE("GPL");
2 changes: 0 additions & 2 deletions drivers/gpu/drm/sti/sti_vtg.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,6 @@ struct platform_driver sti_vtg_driver = {
.remove = vtg_remove,
};

module_platform_driver(sti_vtg_driver);

MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>");
MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver");
MODULE_LICENSE("GPL");

0 comments on commit dcec16e

Please sign in to comment.