| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * Linux MegaRAID device driver |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Copyright (c) 2003-2004 LSI Logic Corporation. |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or |
|---|
| 8 | | - * modify it under the terms of the GNU General Public License |
|---|
| 9 | | - * as published by the Free Software Foundation; either version |
|---|
| 10 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 11 | 7 | * |
|---|
| 12 | 8 | * FILE : megaraid_mm.c |
|---|
| 13 | 9 | * Version : v2.20.2.7 (Jul 16 2006) |
|---|
| .. | .. |
|---|
| 45 | 41 | static void mraid_mm_free_adp_resources(mraid_mmadp_t *); |
|---|
| 46 | 42 | static void mraid_mm_teardown_dma_pools(mraid_mmadp_t *); |
|---|
| 47 | 43 | |
|---|
| 48 | | -#ifdef CONFIG_COMPAT |
|---|
| 49 | | -static long mraid_mm_compat_ioctl(struct file *, unsigned int, unsigned long); |
|---|
| 50 | | -#endif |
|---|
| 51 | | - |
|---|
| 52 | 44 | MODULE_AUTHOR("LSI Logic Corporation"); |
|---|
| 53 | 45 | MODULE_DESCRIPTION("LSI Logic Management Module"); |
|---|
| 54 | 46 | MODULE_LICENSE("GPL"); |
|---|
| .. | .. |
|---|
| 72 | 64 | static const struct file_operations lsi_fops = { |
|---|
| 73 | 65 | .open = mraid_mm_open, |
|---|
| 74 | 66 | .unlocked_ioctl = mraid_mm_unlocked_ioctl, |
|---|
| 75 | | -#ifdef CONFIG_COMPAT |
|---|
| 76 | | - .compat_ioctl = mraid_mm_compat_ioctl, |
|---|
| 77 | | -#endif |
|---|
| 67 | + .compat_ioctl = compat_ptr_ioctl, |
|---|
| 78 | 68 | .owner = THIS_MODULE, |
|---|
| 79 | 69 | .llseek = noop_llseek, |
|---|
| 80 | 70 | }; |
|---|
| .. | .. |
|---|
| 105 | 95 | |
|---|
| 106 | 96 | /** |
|---|
| 107 | 97 | * mraid_mm_ioctl - module entry-point for ioctls |
|---|
| 108 | | - * @inode : inode (ignored) |
|---|
| 109 | 98 | * @filep : file operations pointer (ignored) |
|---|
| 110 | 99 | * @cmd : ioctl command |
|---|
| 111 | 100 | * @arg : user ioctl packet |
|---|
| .. | .. |
|---|
| 228 | 217 | { |
|---|
| 229 | 218 | int err; |
|---|
| 230 | 219 | |
|---|
| 231 | | - /* inconsistent: mraid_mm_compat_ioctl doesn't take the BKL */ |
|---|
| 232 | 220 | mutex_lock(&mraid_mm_mutex); |
|---|
| 233 | 221 | err = mraid_mm_ioctl(filep, cmd, arg); |
|---|
| 234 | 222 | mutex_unlock(&mraid_mm_mutex); |
|---|
| .. | .. |
|---|
| 1026 | 1014 | kfree(adapter->kioc_list); |
|---|
| 1027 | 1015 | kfree(adapter->mbox_list); |
|---|
| 1028 | 1016 | |
|---|
| 1029 | | - if (adapter->pthru_dma_pool) |
|---|
| 1030 | | - dma_pool_destroy(adapter->pthru_dma_pool); |
|---|
| 1017 | + dma_pool_destroy(adapter->pthru_dma_pool); |
|---|
| 1031 | 1018 | |
|---|
| 1032 | 1019 | kfree(adapter); |
|---|
| 1033 | 1020 | |
|---|
| .. | .. |
|---|
| 1241 | 1228 | return 0; |
|---|
| 1242 | 1229 | } |
|---|
| 1243 | 1230 | |
|---|
| 1244 | | - |
|---|
| 1245 | | -#ifdef CONFIG_COMPAT |
|---|
| 1246 | | -/** |
|---|
| 1247 | | - * mraid_mm_compat_ioctl - 32bit to 64bit ioctl conversion routine |
|---|
| 1248 | | - * @filep : file operations pointer (ignored) |
|---|
| 1249 | | - * @cmd : ioctl command |
|---|
| 1250 | | - * @arg : user ioctl packet |
|---|
| 1251 | | - */ |
|---|
| 1252 | | -static long |
|---|
| 1253 | | -mraid_mm_compat_ioctl(struct file *filep, unsigned int cmd, |
|---|
| 1254 | | - unsigned long arg) |
|---|
| 1255 | | -{ |
|---|
| 1256 | | - int err; |
|---|
| 1257 | | - |
|---|
| 1258 | | - err = mraid_mm_ioctl(filep, cmd, arg); |
|---|
| 1259 | | - |
|---|
| 1260 | | - return err; |
|---|
| 1261 | | -} |
|---|
| 1262 | | -#endif |
|---|
| 1263 | 1231 | |
|---|
| 1264 | 1232 | /** |
|---|
| 1265 | 1233 | * mraid_mm_exit - Module exit point |
|---|