aboutsummaryrefslogtreecommitdiff
path: root/shared-core/nouveau_state.c
diff options
context:
space:
mode:
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>2007-11-15 16:00:25 +0100
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>2007-11-15 16:00:54 +0100
commit3c998d8fcbb7745fd949347823eca678c6f904b8 (patch)
tree4dbc2cf0c3321e97840905eab521a49268521e67 /shared-core/nouveau_state.c
parent6206091e5f300616c27dc834922f2976d97f72d4 (diff)
nouveau: use get_property instead of of_get_property on pre-2.6.22 kernels.
Diffstat (limited to 'shared-core/nouveau_state.c')
-rw-r--r--shared-core/nouveau_state.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index 57ae9243..1ece67a7 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -307,13 +307,17 @@ nouveau_card_init(struct drm_device *dev)
DRM_MEMORYBARRIER();
#endif
-#if defined(__powerpc__)
+#if defined(__linux__) && defined(__powerpc__)
/* if we have an OF card, copy vbios to RAMIN */
dn = pci_device_to_OF_node(dev->pdev);
if (dn)
{
- int size;
+ int size;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
const uint32_t *bios = of_get_property(dn, "NVDA,BMP", &size);
+#else
+ const uint32_t *bios = get_property(dn, "NVDA,BMP", &size);
+#endif
if (bios)
{
int i;