diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c index 134201ecc6fd98b65f286c0dd6f1135e04aaabc6..a8441ae2623a2e977196705a1a74706e369361fe 100644 --- a/drivers/gpu/drm/sti/sti_compositor.c +++ b/drivers/gpu/drm/sti/sti_compositor.c @@ -25,7 +25,7 @@ /* * stiH407 compositor properties */ -struct sti_compositor_data stih407_compositor_data = { +static const struct sti_compositor_data stih407_compositor_data = { .nb_subdev = 8, .subdev_desc = { {STI_CURSOR_SUBDEV, (int)STI_CURSOR, 0x000}, @@ -46,7 +46,7 @@ struct sti_compositor_data stih407_compositor_data = { * Moreover, GDPx is different for Main and Aux Mixer. So this subdev map does * not fit for stiH416 if we want to enable the MIXER_AUX. */ -struct sti_compositor_data stih416_compositor_data = { +static const struct sti_compositor_data stih416_compositor_data = { .nb_subdev = 3, .subdev_desc = { {STI_GPD_SUBDEV, (int)STI_GDP_0, 0x100}, diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/drivers/gpu/drm/sti/sti_cursor.c index 3b53f7f2e3fc4b377a6ac118d868557acaf77c4b..651f231c4615481a5a8dd790d5d89cc53b6b77d2 100644 --- a/drivers/gpu/drm/sti/sti_cursor.c +++ b/drivers/gpu/drm/sti/sti_cursor.c @@ -345,7 +345,7 @@ static int sti_cursor_late_register(struct drm_plane *drm_plane) return cursor_debugfs_init(cursor, drm_plane->dev->primary); } -struct drm_plane_funcs sti_cursor_plane_helpers_funcs = { +static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_cursor_destroy, diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index 7cd3804c6deef355ae097661fdc35c320e5ed3d4..e6f0706bc6c75db9d31b9c4cca41f2b9b40e59af 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -140,7 +140,7 @@ static int sti_drm_dbg_init(struct drm_minor *minor) return ret; } -void sti_drm_dbg_cleanup(struct drm_minor *minor) +static void sti_drm_dbg_cleanup(struct drm_minor *minor) { drm_debugfs_remove_files(sti_drm_dbg_list, ARRAY_SIZE(sti_drm_dbg_list), minor); diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c index 00881eb4536e85f3cc196c0389f34cfff98716a6..e8c1ed08a9f7eea0726347082a8f35c9e21c762e 100644 --- a/drivers/gpu/drm/sti/sti_dvo.c +++ b/drivers/gpu/drm/sti/sti_dvo.c @@ -17,6 +17,7 @@ #include #include "sti_awg_utils.h" +#include "sti_drv.h" #include "sti_mixer.h" /* DVO registers */ @@ -106,7 +107,7 @@ struct sti_dvo_connector { container_of(x, struct sti_dvo_connector, drm_connector) #define BLANKING_LEVEL 16 -int dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code) +static int dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code) { struct drm_display_mode *mode = &dvo->mode; struct dvo_config *config = dvo->config; diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index 3fc62c1ea9c286df3a2514c888740beeb70c8129..27b617db4a388538548be9001a44db7e410c3bcc 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c @@ -473,8 +473,8 @@ static void sti_gdp_disable(struct sti_gdp *gdp) * RETURNS: * 0 on success. */ -int sti_gdp_field_cb(struct notifier_block *nb, - unsigned long event, void *data) +static int sti_gdp_field_cb(struct notifier_block *nb, + unsigned long event, void *data) { struct sti_gdp *gdp = container_of(nb, struct sti_gdp, vtg_field_nb); @@ -882,7 +882,7 @@ static int sti_gdp_late_register(struct drm_plane *drm_plane) return gdp_debugfs_init(gdp, drm_plane->dev->primary); } -struct drm_plane_funcs sti_gdp_plane_helpers_funcs = { +static const struct drm_plane_funcs sti_gdp_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_gdp_destroy, diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c index b5ee783e3e7c9127652a1dffdcd5de5792dab97d..04546ebb75d73db9c055aaa70e9a6860b8816379 100644 --- a/drivers/gpu/drm/sti/sti_hqvdp.c +++ b/drivers/gpu/drm/sti/sti_hqvdp.c @@ -17,6 +17,7 @@ #include "sti_hqvdp_lut.h" #include "sti_plane.h" #include "sti_vtg.h" +#include "sti_drv.h" /* Firmware name */ #define HQVDP_FMW_NAME "hqvdp-stih407.bin" @@ -783,7 +784,7 @@ static void sti_hqvdp_disable(struct sti_hqvdp *hqvdp) * RETURNS: * 0 on success. */ -int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data) +static int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data) { struct sti_hqvdp *hqvdp = container_of(nb, struct sti_hqvdp, vtg_nb); int btm_cmd_offset, top_cmd_offest; @@ -1250,7 +1251,7 @@ static int sti_hqvdp_late_register(struct drm_plane *drm_plane) return hqvdp_debugfs_init(hqvdp, drm_plane->dev->primary); } -struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = { +static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = sti_hqvdp_destroy, @@ -1289,7 +1290,7 @@ static struct drm_plane *sti_hqvdp_create(struct drm_device *drm_dev, return &hqvdp->plane.drm_plane; } -int sti_hqvdp_bind(struct device *dev, struct device *master, void *data) +static int sti_hqvdp_bind(struct device *dev, struct device *master, void *data) { struct sti_hqvdp *hqvdp = dev_get_drvdata(dev); struct drm_device *drm_dev = data; diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c index 7d9aea805eab0f80203f8094ad16979ae410712f..b78cec538aaaa63d7c96045457d956fcb8fbda10 100644 --- a/drivers/gpu/drm/sti/sti_mixer.c +++ b/drivers/gpu/drm/sti/sti_mixer.c @@ -358,7 +358,7 @@ int sti_mixer_set_plane_status(struct sti_mixer *mixer, return 0; } -void sti_mixer_set_matrix(struct sti_mixer *mixer) +static void sti_mixer_set_matrix(struct sti_mixer *mixer) { unsigned int i; diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c index e25995b35715f3ddf4c0ca32e42ec97cdf4d2d82..cc07e069a7703fbc78243f505d7be280b863c548 100644 --- a/drivers/gpu/drm/sti/sti_tvout.c +++ b/drivers/gpu/drm/sti/sti_tvout.c @@ -18,6 +18,7 @@ #include #include "sti_crtc.h" +#include "sti_drv.h" #include "sti_vtg.h" /* glue registers */ diff --git a/drivers/gpu/drm/sti/sti_vtac.c b/drivers/gpu/drm/sti/sti_vtac.c index b1eb0d77630dfce30ee13373371edfbb32c10dad..cf7fe8a1db42e1b21b59ba9db7df431302d03259 100644 --- a/drivers/gpu/drm/sti/sti_vtac.c +++ b/drivers/gpu/drm/sti/sti_vtac.c @@ -12,6 +12,8 @@ #include +#include "sti_drv.h" + /* registers offset */ #define VTAC_CONFIG 0x00 #define VTAC_RX_FIFO_CONFIG 0x04 diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c index 0bdc385eec178663b823df0b83c5ed2a320965e8..a8882bdd0f8badf46d0921710dc359cee2f88cde 100644 --- a/drivers/gpu/drm/sti/sti_vtg.c +++ b/drivers/gpu/drm/sti/sti_vtg.c @@ -13,6 +13,7 @@ #include +#include "sti_drv.h" #include "sti_vtg.h" #define VTG_MODE_MASTER 0 @@ -72,7 +73,7 @@ #define AWG_DELAY_ED (-8) #define AWG_DELAY_SD (-7) -LIST_HEAD(vtg_lookup); +static LIST_HEAD(vtg_lookup); /* * STI VTG register offset structure