|
Lines 179-185
Link Here
|
| 179 |
#endif |
179 |
#endif |
| 180 |
}; |
180 |
}; |
| 181 |
|
181 |
|
| 182 |
static struct file_operations vmuser_fops; |
182 |
/* |
|
|
183 |
* Moved file operations initialize here because of incompatibilites |
| 184 |
* with Gentoo hardened profile/hardend Linux 3. |
| 185 |
*/ |
| 186 |
static struct file_operations vmuser_fops = { |
| 187 |
.owner = THIS_MODULE, |
| 188 |
.poll = LinuxDriverPoll, |
| 189 |
#ifdef HAVE_UNLOCKED_IOCTL |
| 190 |
.unlocked_ioctl = LinuxDriver_UnlockedIoctl, |
| 191 |
#else |
| 192 |
.ioctl = LinuxDriver_Ioctl, |
| 193 |
#endif |
| 194 |
#ifdef HAVE_COMPAT_IOCTL |
| 195 |
.compat_ioctl = LinuxDriver_UnlockedIoctl, |
| 196 |
#endif |
| 197 |
.open = LinuxDriver_Open, |
| 198 |
.release = LinuxDriver_Close, |
| 199 |
.mmap = LinuxDriverMmap |
| 200 |
}; |
| 183 |
static struct timer_list tscTimer; |
201 |
static struct timer_list tscTimer; |
| 184 |
|
202 |
|
| 185 |
/* |
203 |
/* |
|
Lines 358-384
Link Here
|
| 358 |
spin_lock_init(&linuxState.pollListLock); |
376 |
spin_lock_init(&linuxState.pollListLock); |
| 359 |
#endif |
377 |
#endif |
| 360 |
|
378 |
|
| 361 |
/* |
|
|
| 362 |
* Initialize the file_operations structure. Because this code is always |
| 363 |
* compiled as a module, this is fine to do it here and not in a static |
| 364 |
* initializer. |
| 365 |
*/ |
| 366 |
|
| 367 |
memset(&vmuser_fops, 0, sizeof vmuser_fops); |
| 368 |
vmuser_fops.owner = THIS_MODULE; |
| 369 |
vmuser_fops.poll = LinuxDriverPoll; |
| 370 |
#ifdef HAVE_UNLOCKED_IOCTL |
| 371 |
vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl; |
| 372 |
#else |
| 373 |
vmuser_fops.ioctl = LinuxDriver_Ioctl; |
| 374 |
#endif |
| 375 |
#ifdef HAVE_COMPAT_IOCTL |
| 376 |
vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl; |
| 377 |
#endif |
| 378 |
vmuser_fops.open = LinuxDriver_Open; |
| 379 |
vmuser_fops.release = LinuxDriver_Close; |
| 380 |
vmuser_fops.mmap = LinuxDriverMmap; |
| 381 |
|
| 382 |
#ifdef VMX86_DEVEL |
379 |
#ifdef VMX86_DEVEL |
| 383 |
devel_init_module(); |
380 |
devel_init_module(); |
| 384 |
linuxState.minor = 0; |
381 |
linuxState.minor = 0; |