Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/dist/drm/i915 Avoid void * ar...
details: https://anonhg.NetBSD.org/src/rev/8a9561661169
branches: riastradh-drm2
changeset: 788415:8a9561661169
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:42:05 2013 +0000
description:
Avoid void * arithmetic in intel_opregion.c.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diffs (47 lines):
diff -r 1553afe80e49 -r 8a9561661169 sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c Wed Jul 24 03:41:49 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c Wed Jul 24 03:42:05 2013 +0000
@@ -551,23 +551,43 @@
goto err_out;
}
opregion->header = base;
+#ifdef __NetBSD__
+ opregion->vbt = (char *)base + OPREGION_VBT_OFFSET;
+#else
opregion->vbt = base + OPREGION_VBT_OFFSET;
+#endif
+#ifdef __NetBSD__
+ opregion->lid_state = (void *)((char *)base + ACPI_CLID);
+#else
opregion->lid_state = base + ACPI_CLID;
+#endif
mboxes = ioread32(&opregion->header->mboxes);
if (mboxes & MBOX_ACPI) {
DRM_DEBUG_DRIVER("Public ACPI methods supported\n");
+#ifdef __NetBSD__
+ opregion->acpi = (void *)((char *)base + OPREGION_ACPI_OFFSET);
+#else
opregion->acpi = base + OPREGION_ACPI_OFFSET;
+#endif
}
if (mboxes & MBOX_SWSCI) {
DRM_DEBUG_DRIVER("SWSCI supported\n");
+#ifdef __NetBSD__
+ opregion->swsci = (void *)((char *)base + OPREGION_SWSCI_OFFSET);
+#else
opregion->swsci = base + OPREGION_SWSCI_OFFSET;
+#endif
}
if (mboxes & MBOX_ASLE) {
DRM_DEBUG_DRIVER("ASLE supported\n");
+#ifdef __NetBSD__
+ opregion->asle = (void *)((char *)base + OPREGION_ASLE_OFFSET);
+#else
opregion->asle = base + OPREGION_ASLE_OFFSET;
+#endif
}
return 0;
Home |
Main Index |
Thread Index |
Old Index