Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 341975 | Differences between
and this patch

Collapse All | Expand All

(-)a/usr/src/nv/Makefile.kbuild (+1 lines)
Lines 180-185 ifneq ($(PATCHLEVEL), 4) Link Here
180
	pci_choose_state \
180
	pci_choose_state \
181
	vm_insert_page \
181
	vm_insert_page \
182
	acquire_console_sem \
182
	acquire_console_sem \
183
	file_operations \
183
	kmem_cache_create \
184
	kmem_cache_create \
184
	on_each_cpu \
185
	on_each_cpu \
185
	smp_call_function \
186
	smp_call_function \
(-)a/usr/src/nv/Makefile.nvidia (+1 lines)
Lines 60-65 COMPILE_TESTS = \ Link Here
60
	change_page_attr \
60
	change_page_attr \
61
	i2c_adapter \
61
	i2c_adapter \
62
	smp_call_function \
62
	smp_call_function \
63
	file_operations \
63
	proc_dir_entry \
64
	proc_dir_entry \
64
 scatterlist
65
 scatterlist
65
66
(-)a/usr/src/nv/conftest.sh (+54 lines)
Lines 1002-1007 compile_test() { Link Here
1002
            fi
1002
            fi
1003
        ;;
1003
        ;;
1004
1004
1005
        file_operations)
1006
            #
1007
            # Determine if the 'file_operations' structure has
1008
            # 'ioctl', 'unlocked_ioctl' and 'compat_ioctl' fields.
1009
            #
1010
            echo "$CONFTEST_PREAMBLE
1011
            #include <linux/fs.h>
1012
            int conftest_file_operations(void) {
1013
                return offsetof(struct file_operations, ioctl);
1014
            }" > conftest$$.c
1015
1016
            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
1017
            rm -f conftest$$.c
1018
1019
            if [ -f conftest$$.o ]; then
1020
                echo "#define NV_FILE_OPERATIONS_HAS_IOCTL" >> conftest.h
1021
                rm -f conftest$$.o
1022
            else
1023
                echo "#undef NV_FILE_OPERATIONS_HAS_IOCTL" >> conftest.h
1024
            fi
1025
1026
            echo "$CONFTEST_PREAMBLE
1027
            #include <linux/fs.h>
1028
            int conftest_file_operations(void) {
1029
                return offsetof(struct file_operations, unlocked_ioctl);
1030
            }" > conftest$$.c
1031
1032
            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
1033
            rm -f conftest$$.c
1034
1035
            if [ -f conftest$$.o ]; then
1036
                echo "#define NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL" >> conftest.h
1037
                rm -f conftest$$.o
1038
            else
1039
                echo "#undef NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL" >> conftest.h
1040
            fi
1041
1042
            echo "$CONFTEST_PREAMBLE
1043
            #include <linux/fs.h>
1044
            int conftest_file_operations(void) {
1045
                return offsetof(struct file_operations, compat_ioctl);
1046
            }" > conftest$$.c
1047
1048
            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
1049
            rm -f conftest$$.c
1050
1051
            if [ -f conftest$$.o ]; then
1052
                echo "#define NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL" >> conftest.h
1053
                rm -f conftest$$.o
1054
            else
1055
                echo "#undef NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL" >> conftest.h
1056
            fi
1057
        ;;
1058
1005
        proc_dir_entry)
1059
        proc_dir_entry)
1006
            #
1060
            #
1007
            # Determine if the 'proc_dir_entry' structure has 
1061
            # Determine if the 'proc_dir_entry' structure has 
(-)a/usr/src/nv/nv-linux.h (+6 lines)
Lines 105-110 Link Here
105
#include <asm/ioctl32.h>            /* sys_ioctl() (ioctl32)            */
105
#include <asm/ioctl32.h>            /* sys_ioctl() (ioctl32)            */
106
#endif
106
#endif
107
107
108
#if !defined(NV_FILE_OPERATIONS_HAS_IOCTL) && \
109
  !defined(NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL)
110
#error "struct file_operations compile test likely failed!"
111
#endif
112
113
108
#if defined(CONFIG_VGA_ARB)
114
#if defined(CONFIG_VGA_ARB)
109
#include <linux/vgaarb.h>
115
#include <linux/vgaarb.h>
110
#endif
116
#endif
(-)a/usr/src/nv/nv.c (-3 / +4 lines)
Lines 249-259 static struct pci_driver nv_pci_driver = { Link Here
249
static struct file_operations nv_fops = {
249
static struct file_operations nv_fops = {
250
    .owner     = THIS_MODULE,
250
    .owner     = THIS_MODULE,
251
    .poll      = nv_kern_poll,
251
    .poll      = nv_kern_poll,
252
#if defined(NV_FILE_OPERATIONS_HAS_IOCTL)
252
    .ioctl     = nv_kern_ioctl,
253
    .ioctl     = nv_kern_ioctl,
253
#if defined(HAVE_UNLOCKED_IOCTL)
254
#endif    
255
#if defined(NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL)
254
    .unlocked_ioctl = nv_kern_unlocked_ioctl,
256
    .unlocked_ioctl = nv_kern_unlocked_ioctl,
255
#endif
257
#endif
256
#if defined(NVCPU_X86_64) && defined(HAVE_COMPAT_IOCTL)
258
#if defined(NVCPU_X86_64) && defined(NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL)
257
    .compat_ioctl = nv_kern_compat_ioctl,
259
    .compat_ioctl = nv_kern_compat_ioctl,
258
#endif
260
#endif
259
    .mmap      = nv_kern_mmap,
261
    .mmap      = nv_kern_mmap,
260
- 

Return to bug 341975