Module Name: src
Committed By: riastradh
Date: Wed Jul 24 02:12:46 UTC 2013
Modified Files:
src/sys/external/bsd/drm2/dist/include/drm [riastradh-drm2]:
drm_crtc_helper.h
Log Message:
Add some expedient __UNCONST workarounds to drm_crtc_helper.h.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_crtc_helper.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/dist/include/drm/drm_crtc_helper.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_crtc_helper.h:1.1.1.1.2.2 src/sys/external/bsd/drm2/dist/include/drm/drm_crtc_helper.h:1.1.1.1.2.3
--- src/sys/external/bsd/drm2/dist/include/drm/drm_crtc_helper.h:1.1.1.1.2.2 Tue Jul 23 21:28:23 2013
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_crtc_helper.h Wed Jul 24 02:12:46 2013
@@ -145,19 +145,37 @@ extern int drm_helper_mode_fill_fb_struc
static inline void drm_crtc_helper_add(struct drm_crtc *crtc,
const struct drm_crtc_helper_funcs *funcs)
{
+#ifdef __NetBSD__
+ /*
+ * XXX This is wrong, but more expedient than going through all
+ * the uses of helper_private and constifying them. Whoever
+ * comes through this code with a few spare moments should
+ * consider donating them to the cause of doing that.
+ */
+ crtc->helper_private = (void *)__UNCONST(funcs);
+#else
crtc->helper_private = (void *)funcs;
+#endif
}
static inline void drm_encoder_helper_add(struct drm_encoder *encoder,
const struct drm_encoder_helper_funcs *funcs)
{
+#ifdef __NetBSD__
+ encoder->helper_private = (void *)__UNCONST(funcs);
+#else
encoder->helper_private = (void *)funcs;
+#endif
}
static inline void drm_connector_helper_add(struct drm_connector *connector,
const struct drm_connector_helper_funcs *funcs)
{
+#ifdef __NetBSD__
+ connector->helper_private = (void *)__UNCONST(funcs);
+#else
connector->helper_private = (void *)funcs;
+#endif
}
extern int drm_helper_resume_force_mode(struct drm_device *dev);