The structure contains function pointers that don't need to be modified.
Make all its instances const to improve security.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
return in->ops.atv->check_timings(in, vm);
}
-static struct omap_dss_driver tvc_driver = {
+static const struct omap_dss_driver tvc_driver = {
.connect = tvc_connect,
.disconnect = tvc_disconnect,
mutex_unlock(&ddata->hpd_lock);
}
-static struct omap_dss_driver dvic_driver = {
+static const struct omap_dss_driver dvic_driver = {
.connect = dvic_connect,
.disconnect = dvic_disconnect,
return in->ops.hdmi->set_infoframe(in, avi);
}
-static struct omap_dss_driver hdmic_driver = {
+static const struct omap_dss_driver hdmic_driver = {
.connect = hdmic_connect,
.disconnect = hdmic_disconnect,
return in->ops.dpi->check_timings(in, vm);
}
-static struct omap_dss_driver panel_dpi_ops = {
+static const struct omap_dss_driver panel_dpi_ops = {
.connect = panel_dpi_connect,
.disconnect = panel_dpi_disconnect,
*height = ddata->height_mm;
}
-static struct omap_dss_driver dsicm_ops = {
+static const struct omap_dss_driver dsicm_ops = {
.connect = dsicm_connect,
.disconnect = dsicm_disconnect,
return in->ops.dpi->check_timings(in, vm);
}
-static struct omap_dss_driver lb035q02_ops = {
+static const struct omap_dss_driver lb035q02_ops = {
.connect = lb035q02_connect,
.disconnect = lb035q02_disconnect,
return in->ops.dpi->check_timings(in, vm);
}
-static struct omap_dss_driver nec_8048_ops = {
+static const struct omap_dss_driver nec_8048_ops = {
.connect = nec_8048_connect,
.disconnect = nec_8048_disconnect,
return in->ops.dpi->check_timings(in, vm);
}
-static struct omap_dss_driver sharp_ls_ops = {
+static const struct omap_dss_driver sharp_ls_ops = {
.connect = sharp_ls_connect,
.disconnect = sharp_ls_disconnect,
return in->ops.sdi->check_timings(in, vm);
}
-static struct omap_dss_driver acx565akm_ops = {
+static const struct omap_dss_driver acx565akm_ops = {
.connect = acx565akm_connect,
.disconnect = acx565akm_disconnect,
return in->ops.dpi->check_timings(in, vm);
}
-static struct omap_dss_driver td028ttec1_ops = {
+static const struct omap_dss_driver td028ttec1_ops = {
.connect = td028ttec1_panel_connect,
.disconnect = td028ttec1_panel_disconnect,
return in->ops.dpi->check_timings(in, vm);
}
-static struct omap_dss_driver tpo_td043_ops = {
+static const struct omap_dss_driver tpo_td043_ops = {
.connect = tpo_td043_connect,
.disconnect = tpo_td043_disconnect,
const char *name;
- struct omap_dss_driver *driver;
+ const struct omap_dss_driver *driver;
union {
const struct omapdss_dpi_ops *dpi;
{
struct omap_connector *omap_connector = to_omap_connector(connector);
struct omap_dss_device *dssdev = omap_connector->dssdev;
- struct omap_dss_driver *dssdrv = dssdev->driver;
+ const struct omap_dss_driver *dssdrv = dssdev->driver;
enum drm_connector_status ret;
if (dssdrv->detect) {
{
struct omap_connector *omap_connector = to_omap_connector(connector);
struct omap_dss_device *dssdev = omap_connector->dssdev;
- struct omap_dss_driver *dssdrv = dssdev->driver;
+ const struct omap_dss_driver *dssdrv = dssdev->driver;
struct drm_device *dev = connector->dev;
int n = 0;
{
struct omap_connector *omap_connector = to_omap_connector(connector);
struct omap_dss_device *dssdev = omap_connector->dssdev;
- struct omap_dss_driver *dssdrv = dssdev->driver;
+ const struct omap_dss_driver *dssdrv = dssdev->driver;
struct videomode vm = {0};
struct drm_device *dev = connector->dev;
struct drm_display_mode *new_mode;
{
struct omap_encoder *omap_encoder = to_omap_encoder(encoder);
struct omap_dss_device *dssdev = omap_encoder->dssdev;
- struct omap_dss_driver *dssdrv = dssdev->driver;
+ const struct omap_dss_driver *dssdrv = dssdev->driver;
dssdrv->disable(dssdev);
}
struct drm_device *dev = encoder->dev;
struct omap_encoder *omap_encoder = to_omap_encoder(encoder);
struct omap_dss_device *dssdev = omap_encoder->dssdev;
- struct omap_dss_driver *dssdrv = dssdev->driver;
+ const struct omap_dss_driver *dssdrv = dssdev->driver;
int ret;
if (dssdrv->check_timings) {
{
struct omap_encoder *omap_encoder = to_omap_encoder(encoder);
struct omap_dss_device *dssdev = omap_encoder->dssdev;
- struct omap_dss_driver *dssdrv = dssdev->driver;
+ const struct omap_dss_driver *dssdrv = dssdev->driver;
int r;
omap_encoder_update(encoder, omap_crtc_channel(encoder->crtc),