forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/scsi/esas2r/esas2r_main.c
....@@ -250,7 +250,6 @@
250250 ESAS2R_DEFAULT_CMD_PER_LUN,
251251 .present = 0,
252252 .unchecked_isa_dma = 0,
253
- .use_clustering = ENABLE_CLUSTERING,
254253 .emulated = 0,
255254 .proc_name = ESAS2R_DRVR_NAME,
256255 .change_queue_depth = scsi_change_queue_depth,
....@@ -614,8 +613,15 @@
614613
615614 /* Handle ioctl calls to "/proc/scsi/esas2r/ATTOnode" */
616615 static const struct file_operations esas2r_proc_fops = {
617
- .compat_ioctl = esas2r_proc_ioctl,
616
+ .compat_ioctl = compat_ptr_ioctl,
618617 .unlocked_ioctl = esas2r_proc_ioctl,
618
+};
619
+
620
+static const struct proc_ops esas2r_proc_ops = {
621
+ .proc_ioctl = esas2r_proc_ioctl,
622
+#ifdef CONFIG_COMPAT
623
+ .proc_compat_ioctl = compat_ptr_ioctl,
624
+#endif
619625 };
620626
621627 static struct Scsi_Host *esas2r_proc_host;
....@@ -624,7 +630,7 @@
624630 long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
625631 {
626632 return esas2r_ioctl_handler(esas2r_proc_host->hostdata,
627
- (int)cmd, (void __user *)arg);
633
+ cmd, (void __user *)arg);
628634 }
629635
630636 static void __exit esas2r_exit(void)
....@@ -729,7 +735,7 @@
729735
730736 pde = proc_create(ATTONODE_NAME, 0,
731737 sh->hostt->proc_dir,
732
- &esas2r_proc_fops);
738
+ &esas2r_proc_ops);
733739
734740 if (!pde) {
735741 esas2r_log_dev(ESAS2R_LOG_WARN,