File hdjmod_kernel_5.0.patch of Package hdjmod.13737

diff -ur hdjmod-1.28.orig/source/bulk.c hdjmod-1.28/source/bulk.c
--- hdjmod-1.28.orig/source/bulk.c	2019-03-18 11:22:52.220314382 +0100
+++ hdjmod-1.28/source/bulk.c	2019-03-18 11:40:25.665723290 +0100
@@ -622,7 +622,7 @@
 	case DJ_IOCTL_GET_VERSION:
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_VERSION\n",
 						__FUNCTION__);
-		access = access_ok(VERIFY_WRITE,ioctl_param, sizeof(u32));
+		access = write_ok(ioctl_param, sizeof(u32));
 		if (access!=0) {
 			value32p_user = (u32 __user *)ioctl_param;
 			result = __put_user(driver_version,value32p_user);
@@ -645,7 +645,7 @@
 			__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_jogwheel_lock_status(ubulk, &value, 1, 0);
 			if (result==0) {
@@ -671,7 +671,7 @@
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_SET_JOG_WHEEL_LOCK_SETTING\n",__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(u16));
+		access = read_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value16p_user = (u16 __user *)ioctl_param;
@@ -696,7 +696,7 @@
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_JOG_WHEEL_SENSITIVITY\n",__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode */
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_jogwheel_sensitivity(ubulk, &value, 1, 0);
 			if (result == 0) {
@@ -722,7 +722,7 @@
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_SET_JOG_WHEEL_SENSITIVITY\n",__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(u16));
+		access = read_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value16p_user = (u16 __user *)ioctl_param;
@@ -749,7 +749,7 @@
 						__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value16p_user = (u16 __user *)ioctl_param;
@@ -786,7 +786,7 @@
 						__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_midi_channel(chip, &value);
 			if (result==0) {
@@ -813,7 +813,7 @@
 						__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u32));
+		access = write_ok(ioctl_param,sizeof(u32));
 		if (access) {
 			value32 = ubulk->chip->product_code;
 			result = 0;
@@ -846,7 +846,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_talkover_att(ubulk, &value, 1);
 
@@ -873,7 +873,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(u16));
+		access = read_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value16p_user = (u16 __user *)ioctl_param;
@@ -899,7 +899,7 @@
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_SET_TALKOVER_ENABLE\n",
 					__FUNCTION__);
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(u8));
+		access = read_ok(ioctl_param,sizeof(u8));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value8p_user = (u8 __user *)ioctl_param;
@@ -925,7 +925,7 @@
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_TALKOVER_ENABLE\n",
 						__FUNCTION__);
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u8));
+		access = write_ok(ioctl_param,sizeof(u8));
 		if (access) {
 			result = get_talkover_enable(ubulk, &value8);
 
@@ -951,7 +951,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_firmware_version(chip, &value, 1);
 			if (result==0) {
@@ -978,7 +978,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access)
 		{
 			result = get_djconsole_device_config(ubulk->chip->index, &value, 0);
@@ -1006,7 +1006,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(u32));
+		access = read_ok(ioctl_param,sizeof(u32));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value32p_user = (u32 __user *)ioctl_param;
@@ -1033,7 +1033,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_audio_config(ubulk, &value, 1);
 			if (result==0) {
@@ -1060,7 +1060,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(u16));
+		access = read_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value16p_user = (u16 __user *)ioctl_param;
@@ -1110,7 +1110,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_mouse_state(chip, &value);
 			if (result==0) {
@@ -1137,7 +1137,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_sample_rate(ubulk, &value, 0);
 			if (result == 0) {
@@ -1164,7 +1164,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(u16));
+		access = read_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value16p_user = (u16 __user *)ioctl_param;
@@ -1191,7 +1191,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(u16));
+		access = read_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value16p_user = (u16 __user *)ioctl_param;
@@ -1217,7 +1217,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_crossfader_lock(ubulk, &value, 0);
 			if (result==0) {
@@ -1244,7 +1244,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value16p_user = (u16 __user *)ioctl_param;
@@ -1270,7 +1270,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_crossfader_style(ubulk, &value);
 			if (result==0) {
@@ -1306,7 +1306,7 @@
 		}
 		
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(struct FIRMWARE_FILE));
+		access = read_ok(ioctl_param,sizeof(struct FIRMWARE_FILE));
 		if (access) {
 			/*allocate the kernel mode buffer*/
 			firmware_data = zero_alloc(sizeof(struct FIRMWARE_FILE),GFP_KERNEL);
@@ -1342,7 +1342,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(u8));
+		access = read_ok(ioctl_param,sizeof(u8));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value8p_user = (u8 __user *)ioctl_param;
@@ -1368,7 +1368,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode */
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u8));
+		access = write_ok(ioctl_param,sizeof(u8));
 		if (access) {
 			result = get_mode_shift_state(ubulk, (u8*)&value8);
 			if (result==0) {
@@ -1395,7 +1395,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,sizeof(u16));
+		access = read_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value16p_user = (u16 __user *)ioctl_param;
@@ -1421,7 +1421,7 @@
 					__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			result = get_fx_state(ubulk, &value);
 			if (result==0) {
@@ -1456,7 +1456,7 @@
 		}
 		dc = ((struct hdj_steel_context*)ubulk->device_context);
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			if (atomic_read(&dc->device_mode) == DJ_STEEL_IN_NORMAL_MODE) {
 				result = reboot_djcontrolsteel_to_boot_mode(ubulk);
@@ -1505,7 +1505,7 @@
 		}
 		dc = ((struct hdj_steel_context*)ubulk->device_context);
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			if (atomic_read(&dc->device_mode) == DJ_STEEL_IN_BOOT_MODE)
 			{
@@ -1553,7 +1553,7 @@
 		}
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,LOCATION_ID_LEN);
+		access = write_ok(ioctl_param,LOCATION_ID_LEN);
 		if (access) {
 			/*copy the kernel mode buffer to usermode*/
 			ctouser = copy_to_user((void*)ioctl_param,(void*)&chip->usb_device_path[0],LOCATION_ID_LEN);
@@ -1591,7 +1591,7 @@
 		}
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_READ,ioctl_param,DJ_CONTROL_STEEL_BULK_TRANSFER_SIZE);
+		access = read_ok(ioctl_param,DJ_CONTROL_STEEL_BULK_TRANSFER_SIZE);
 		if (access) {
 			/*allocate the kernel mode buffer*/
 			bulk_write = zero_alloc(DJ_CONTROL_STEEL_BULK_TRANSFER_SIZE,GFP_KERNEL);
@@ -1656,7 +1656,7 @@
 		if (compat_mode==0) {
 			ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_REGISTER_FOR_NETLINK_DEVICE_NOTIFICATIONS\n",
 					__FUNCTION__);
-			access = access_ok(VERIFY_READ,ioctl_param,sizeof(unsigned long));
+			access = read_ok(ioctl_param,sizeof(unsigned long));
 		} else {
 			ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_REGISTER_FOR_NETLINK_DEVICE_NOTIFICATIONS32\n",
 					__FUNCTION__);
@@ -1667,7 +1667,7 @@
 			result = -EINVAL;
 			break;
 #else
-			access = access_ok(VERIFY_READ,ioctl_param,sizeof(compat_long_t));
+			access = read_ok(ioctl_param,sizeof(compat_long_t));
 #endif
 		}
 		if (access) {
@@ -1717,7 +1717,7 @@
 	case DJ_IOCTL_GET_CONTROL_DATA_INPUT_PACKET_SIZE:
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_CONTROL_DATA_INPUT_PACKET_SIZE\n",
 					__FUNCTION__);
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u32));
+		access = write_ok(ioctl_param,sizeof(u32));
 		if (access) {
 			result = get_input_control_data_len(chip,&value32);
 			if (result==0) {
@@ -1740,7 +1740,7 @@
 	case DJ_IOCTL_GET_CONTROL_DATA_OUTPUT_PACKET_SIZE:
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_CONTROL_DATA_OUTPUT_PACKET_SIZE\n",
 					__FUNCTION__);
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u32));
+		access = write_ok(ioctl_param,sizeof(u32));
 		if (access) {
 			result = get_output_control_data_len(chip,&value32);
 			if (result==0) {
@@ -1785,7 +1785,7 @@
 			result = -EINVAL;
 			break;	
 		}
-		access = access_ok(VERIFY_READ,ioctl_param,size);
+		access = read_ok(ioctl_param,size);
 		if (access) {
 			control_data_and_mask = kmalloc(size,GFP_KERNEL);
 			if (control_data_and_mask!=NULL) {
@@ -1832,7 +1832,7 @@
 					__FUNCTION__,result);
 			break;	
 		}
-		access = access_ok(VERIFY_WRITE,ioctl_param,value32);
+		access = write_ok(ioctl_param,value32);
 		if (access) {
 			result = get_control_output_report(chip,(u8 __user *)ioctl_param,value32);
 			if (result != 0) {
@@ -1847,7 +1847,7 @@
 	case DJ_IOCTL_ACQUIRE_NETLINK_UNIT:
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_ACQUIRE_NETLINK_UNIT\n",
 					__FUNCTION__);
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(int));
+		access = write_ok(ioctl_param,sizeof(int));
 		if (access) {
 			valueip_user = (int __user *)ioctl_param;
 			result = __put_user(netlink_unit, valueip_user);
@@ -1864,7 +1864,7 @@
 	case DJ_IOCTL_GET_DEVICE_CAPS:
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_DEVICE_CAPS\n",
 					__FUNCTION__);
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(struct snd_hdj_caps));
+		access = write_ok(ioctl_param,sizeof(struct snd_hdj_caps));
 		if (access) {
 			/*copy the kernel mode buffer to usermode*/
 			ctouser = copy_to_user((void*)ioctl_param,(void*)&chip->caps,sizeof(struct snd_hdj_caps));
diff -ur hdjmod-1.28.orig/source/device.h hdjmod-1.28/source/device.h
--- hdjmod-1.28.orig/source/device.h	2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/source/device.h	2019-03-18 11:38:57.128596342 +0100
@@ -27,6 +27,14 @@
 #if !defined(_HDJDEVICE2_H_)
 #define _HDJDEVICE_H_
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) && defined(VERIFY_WRITE)
+	#define write_ok(addr, size) access_ok(VERIFY_WRITE, addr, size)
+	#define read_ok(addr, size) access_ok(VERIFY_READ, addr, size)
+#else
+	#define write_ok(addr, size) access_ok(addr, size)
+	#define read_ok(addr, size) access_ok(addr, size)
+#endif
+
 extern int					netlink_unit;
 
 #define							MIN_NETLINK_UNIT		22
diff -ur hdjmod-1.28.orig/source/midi.c hdjmod-1.28/source/midi.c
--- hdjmod-1.28.orig/source/midi.c	2019-03-18 11:22:52.224314434 +0100
+++ hdjmod-1.28/source/midi.c	2019-03-18 11:40:25.669723340 +0100
@@ -1480,7 +1480,7 @@
 	case DJ_IOCTL_GET_VERSION:
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_VERSION\n",
 						__FUNCTION__);
-		access = access_ok(VERIFY_WRITE,ioctl_param, sizeof(u32));
+		access = write_ok(ioctl_param, sizeof(u32));
 		if (access!=0) {
 			value32p_user = (u32 __user *)ioctl_param;
 			err = __put_user(driver_version,value32p_user);
@@ -1500,7 +1500,7 @@
 	case DJ_IOCTL_GET_FIRMWARE_VERSION:
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_FIRMWARE_VERSION\n",
 				__FUNCTION__);
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			err = get_firmware_version(chip,&value16,1);
 			if (err==0) {
@@ -1532,7 +1532,7 @@
 		}
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,LOCATION_ID_LEN);
+		access = write_ok(ioctl_param,LOCATION_ID_LEN);
 		if (access) {
 			/*copy the kernel mode buffer to usermode*/
 			ctouser = copy_to_user((void*)ioctl_param,(void*)&chip->usb_device_path[0],
@@ -1555,7 +1555,7 @@
 						__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u32));
+		access = write_ok(ioctl_param,sizeof(u32));
 		if (access) {
 			value32 = chip->product_code;
 
@@ -1577,7 +1577,7 @@
 						__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			/*copy the usermode buffer to kernel mode*/
 			value16p_user = (u16 __user *)ioctl_param;
@@ -1614,7 +1614,7 @@
 						__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			err = get_midi_channel(chip, &value16);
 			if (err==0) {
@@ -1656,7 +1656,7 @@
 		printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_MOUSE_STATE\n",__FUNCTION__);
 
 		/*verify that the address isn't in kernel mode*/
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u16));
+		access = write_ok(ioctl_param,sizeof(u16));
 		if (access) {
 			err = get_mouse_state(chip, &value16);
 			if (err==0) {
@@ -1685,7 +1685,7 @@
 		if (compat_mode==0) {
 			ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_REGISTER_FOR_NETLINK_DEVICE_NOTIFICATIONS\n",
 						__FUNCTION__);
-			access = access_ok(VERIFY_READ,ioctl_param,sizeof(unsigned long));
+			access = read_ok(ioctl_param,sizeof(unsigned long));
 		} else {
 			ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_REGISTER_FOR_NETLINK_DEVICE_NOTIFICATIONS32\n",
 						__FUNCTION__);
@@ -1696,7 +1696,7 @@
 			err = -EINVAL;
 			break;
 #else
-			access = access_ok(VERIFY_READ,ioctl_param,sizeof(compat_long_t));
+			access = read_ok(ioctl_param,sizeof(compat_long_t));
 #endif
 		}
 		if (access) {
@@ -1745,7 +1745,7 @@
 	case DJ_IOCTL_ACQUIRE_NETLINK_UNIT:
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_ACQUIRE_NETLINK_UNIT\n",
 					__FUNCTION__);
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(int));
+		access = write_ok(ioctl_param,sizeof(int));
 		if (access) {
 			valueip_user = (int __user *)ioctl_param;
 			err = __put_user(netlink_unit, valueip_user);
@@ -1771,7 +1771,7 @@
 	case DJ_IOCTL_GET_CONTROL_DATA_INPUT_PACKET_SIZE:
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_CONTROL_DATA_INPUT_PACKET_SIZE\n",
 					__FUNCTION__);
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u32));
+		access = write_ok(ioctl_param,sizeof(u32));
 		if (access) {
 			err = get_input_control_data_len(chip,&value32);
 			if (err==0) {
@@ -1794,7 +1794,7 @@
 	case DJ_IOCTL_GET_CONTROL_DATA_OUTPUT_PACKET_SIZE:
 		ioctl_trace_printk(KERN_INFO"%s() received IOCTL:  DJ_IOCTL_GET_CONTROL_DATA_OUTPUT_PACKET_SIZE\n",
 					__FUNCTION__);
-		access = access_ok(VERIFY_WRITE,ioctl_param,sizeof(u32));
+		access = write_ok(ioctl_param,sizeof(u32));
 		if (access) {
 			err = get_output_control_data_len(chip,&value32);
 			if (err==0) {
@@ -1835,7 +1835,7 @@
 				err = -EINVAL;
 				break;	
 			}
-			access = access_ok(VERIFY_READ,ioctl_param,size);
+			access = read_ok(ioctl_param,size);
 			if (access) {
 				control_data_and_mask = kmalloc(size,GFP_KERNEL);
 				if (control_data_and_mask!=NULL) {
@@ -1882,7 +1882,7 @@
 		}
 		err = get_output_control_data_len(chip,&value32);
 		if (err==0) {
-			access = access_ok(VERIFY_WRITE,ioctl_param,value32);
+			access = write_ok(ioctl_param,value32);
 			if (access) {
 				err = get_control_output_report(chip,(u8 __user *)ioctl_param,value32);
 				if (err != 0) {
openSUSE Build Service is sponsored by