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

(-)work-orig/kernel/conftest.sh (+54 lines)
Lines 1104-1109 Link Here
1104
            fi
1104
            fi
1105
        ;;
1105
        ;;
1106
1106
1107
        file_operations)
1108
            #
1109
            # Determine if the 'file_operations' structure has
1110
            # 'ioctl', 'unlocked_ioctl' and 'compat_ioctl' fields.
1111
            #
1112
            echo "$CONFTEST_PREAMBLE
1113
            #include <linux/fs.h>
1114
            int conftest_file_operations(void) {
1115
                return offsetof(struct file_operations, ioctl);
1116
            }" > conftest$$.c
1117
1118
            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
1119
            rm -f conftest$$.c
1120
1121
            if [ -f conftest$$.o ]; then
1122
                echo "#define NV_FILE_OPERATIONS_HAS_IOCTL" >> conftest.h
1123
                rm -f conftest$$.o
1124
            else
1125
                echo "#undef NV_FILE_OPERATIONS_HAS_IOCTL" >> conftest.h
1126
            fi
1127
1128
            echo "$CONFTEST_PREAMBLE
1129
            #include <linux/fs.h>
1130
            int conftest_file_operations(void) {
1131
                return offsetof(struct file_operations, unlocked_ioctl);
1132
            }" > conftest$$.c
1133
1134
            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
1135
            rm -f conftest$$.c
1136
1137
            if [ -f conftest$$.o ]; then
1138
                echo "#define NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL" >> conftest.h
1139
                rm -f conftest$$.o
1140
            else
1141
                echo "#undef NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL" >> conftest.h
1142
            fi
1143
1144
            echo "$CONFTEST_PREAMBLE
1145
            #include <linux/fs.h>
1146
            int conftest_file_operations(void) {
1147
                return offsetof(struct file_operations, compat_ioctl);
1148
            }" > conftest$$.c
1149
1150
            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
1151
            rm -f conftest$$.c
1152
1153
            if [ -f conftest$$.o ]; then
1154
                echo "#define NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL" >> conftest.h
1155
                rm -f conftest$$.o
1156
            else
1157
                echo "#undef NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL" >> conftest.h
1158
            fi
1159
        ;;
1160
1107
        pci_domain_nr)
1161
        pci_domain_nr)
1108
            #
1162
            #
1109
            # Determine if the pci_domain_nr() function is present.
1163
            # Determine if the pci_domain_nr() function is present.
(-)work-orig/kernel/Makefile.kbuild (+1 lines)
Lines 156-161 Link Here
156
 acpi_device_ops \
156
 acpi_device_ops \
157
 acpi_device_id \
157
 acpi_device_id \
158
 acquire_console_sem \
158
 acquire_console_sem \
159
 file_operations \
159
 kmem_cache_create \
160
 kmem_cache_create \
160
 on_each_cpu \
161
 on_each_cpu \
161
 smp_call_function \
162
 smp_call_function \
(-)work-orig/kernel/Makefile.nvidia (+1 lines)
Lines 56-61 Link Here
56
	i2c_adapter \
56
	i2c_adapter \
57
	smp_call_function \
57
	smp_call_function \
58
	acpi_evaluate_integer \
58
	acpi_evaluate_integer \
59
	file_operations \
59
	proc_dir_entry \
60
	proc_dir_entry \
60
 scatterlist
61
 scatterlist
61
62
(-)work-orig/kernel/nv.c (-2 / +4 lines)
Lines 423-433 Link Here
423
static struct file_operations nv_fops = {
423
static struct file_operations nv_fops = {
424
    .owner     = THIS_MODULE,
424
    .owner     = THIS_MODULE,
425
    .poll      = nv_kern_poll,
425
    .poll      = nv_kern_poll,
426
#if defined(NV_FILE_OPERATIONS_HAS_IOCTL)    
426
    .ioctl     = nv_kern_ioctl,
427
    .ioctl     = nv_kern_ioctl,
427
#if defined(HAVE_UNLOCKED_IOCTL)
428
#endif    
429
#if defined(NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL)
428
    .unlocked_ioctl = nv_kern_unlocked_ioctl,
430
    .unlocked_ioctl = nv_kern_unlocked_ioctl,
429
#endif
431
#endif
430
#if defined(NVCPU_X86_64) && defined(HAVE_COMPAT_IOCTL)
432
#if defined(NVCPU_X86_64) && defined(NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL)
431
    .compat_ioctl = nv_kern_compat_ioctl,
433
    .compat_ioctl = nv_kern_compat_ioctl,
432
#endif
434
#endif
433
#ifndef NV_USER_MAP
435
#ifndef NV_USER_MAP
(-)work-orig/kernel/nv-linux.h (+5 lines)
Lines 112-117 Link Here
112
#include <asm/ioctl32.h>            /* sys_ioctl() (ioctl32)            */
112
#include <asm/ioctl32.h>            /* sys_ioctl() (ioctl32)            */
113
#endif
113
#endif
114
114
115
#if !defined(NV_FILE_OPERATIONS_HAS_IOCTL) && \
116
  !defined(NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL)
117
#error "struct file_operations compile test likely failed!"
118
#endif
119
115
#if defined(CONFIG_VGA_ARB)
120
#if defined(CONFIG_VGA_ARB)
116
#include <linux/vgaarb.h>
121
#include <linux/vgaarb.h>
117
#endif
122
#endif

Return to bug 341975