--- usr/src/nv/os-agp.c.orig 2009-07-12 15:58:07.000000000 -0700 +++ usr/src/nv/os-agp.c.orig 2009-07-12 16:05:05.000000000 -0700 @@ -293,7 +293,11 @@ { nv_pte_t *page_ptr = at->page_table[i]; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) page_ptr->phys_addr = (ptr->memory[i] & PAGE_MASK); +#else + page_ptr->phys_addr = (page_to_phys(ptr->pages[i]) & PAGE_MASK); +#endif page_ptr->virt_addr = (unsigned long) __va(page_ptr->phys_addr); page_ptr->dma_addr = page_ptr->phys_addr; } --- usr/src/nv/nv-i2c.c.orig 2009-07-12 16:11:21.000000000 -0700 +++ usr/src/nv/nv-i2c.c.orig 2009-07-12 16:11:25.000000000 -0700 @@ -225,6 +225,7 @@ #else // defined(KERNEL_2_4) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) static int nv_i2c_adapter_register_client(struct i2c_client * pClient) { try_module_get(THIS_MODULE); @@ -236,13 +237,16 @@ module_put(THIS_MODULE); return 0; } +#endif struct i2c_adapter nv_i2c_adapter_prototype = { .owner = THIS_MODULE, .algo = &nv_i2c_algo, .algo_data = NULL, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) .client_register = nv_i2c_adapter_register_client, .client_unregister = nv_i2c_adapter_unregister_client, +#endif }; #endif // defined(KERNEL_2_4)