Репозиторий Sisyphus
Последнее обновление: 28 сентября 2022 | Пакетов: 17650 | Посещений: 25047624
en ru br
Репозитории ALT
S:1.2.3-alt4.331590.1
5.1: 2.0.1-alt0.M51.1.132638.15
www.altlinux.org/Changes

Группа :: Система/Ядро и оборудование
Пакет: kernel-modules-lsadrv-std-def

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: ioctl_and_mutex.patch
Скачать


diff -ru a/fakemouse.c b/fakemouse.c
--- a/fakemouse.c	2011-03-25 10:43:19.535739443 +0000
+++ b/fakemouse.c	2011-03-25 10:44:01.058340229 +0000
@@ -25,7 +25,7 @@
 #define REPORT(FMT,VAL) printk(KERN_ALERT stringify( MODNAME ) ":" FMT "!\n", VAL);
 #define WARN(X) printk(KERN_WARNING stringify( MODNAME ) ":" X "!\n");
 
-static int fakemouse_ioctl(struct inode *inode, struct file *filp,unsigned int command, unsigned long arg);
+static long fakemouse_ioctl(struct file *filp,unsigned int command, unsigned long arg);
 static int fakemouse_device_open(struct inode *inode, struct file *filp);
 static int fakemouse_device_release(struct inode *inode, struct file *filp);
 
@@ -35,7 +35,7 @@
     .llseek  = 0,
     .read    = 0,
     .write   = 0,
-    .ioctl   = fakemouse_ioctl,
+    .compat_ioctl   = fakemouse_ioctl,
     .open    = fakemouse_device_open,
     .release = fakemouse_device_release,
   };
@@ -43,7 +43,7 @@
 
 int lsadrv_ioctl_mouseevent_dispatch(void *arg);
 
-static int fakemouse_ioctl(struct inode *inode, struct file *filp,unsigned int command, unsigned long arg)
+static long fakemouse_ioctl(struct file *filp,unsigned int command, unsigned long arg)
 {
   struct lsadrv_mouse_input *minp = (struct lsadrv_mouse_input*)arg;
 
diff -ru a/lsadrv-main.c b/lsadrv-main.c
--- a/lsadrv-main.c	2011-02-05 15:24:12.000000000 +0000
+++ b/lsadrv-main.c	2011-03-25 10:55:32.165628024 +0000
@@ -66,7 +66,7 @@
 	.id_table =		lsadrv_device_table,
 	.probe =		usb_lsadrv_probe,	/* probe() */
 	.disconnect =		usb_lsadrv_disconnect,	/* disconnect() */
-	.ioctl =		usb_lsadrv_ioctl	/* through usbdevfs (devio) driver */
+	.unlocked_ioctl =		usb_lsadrv_ioctl	/* through usbdevfs (devio) driver */
 };
 
 static LIST_HEAD(device_list);
@@ -247,7 +247,7 @@
 
 	xdev->udev = udev;
 	lsadrv_spin_lock_init(&xdev->streamLock);
-	init_MUTEX(&xdev->modlock); 
+	sema_init(&xdev->modlock, 1); 
 	init_waitqueue_head(&xdev->remove_ok);
 
 	/* set ids as input device */
@@ -500,7 +500,7 @@
 	}
 
 	Debug("init_Mutex\n");
-	init_MUTEX(&device_list_lock); 
+	sema_init(&device_list_lock, 1); 
 
 	/*** create procfs directory and 'devices' file ***/
 	Debug("creating procfs\n");
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin