[Voyage-linux] Re: Compiling voyage kernel and drivers. Ref: CM19A USB txcvr for X10 home automation
malo
(spam-protected)
Wed Jul 18 03:51:02 HKT 2012
Rajarajan Rajamani <r.rajamani at ...> writes:
>
> I am trying to compile a driver for the C19A USB RF transceiver under
> Voyage 0.8.5.
> using the code for the driver using Neil Cherrys code for the CM19A on the
>
-first you should set the correct paths for your
env in the makefile of the driver. -second, as
changes came up with new kernels to get rid of
the BKL, you must
patch the driver. i took a look to manage
the code and it seems to be compiled
without errors after a few mods. Here the patch:
--- device-orig.c 2010-05-07 16:57:38.000000000 +0200
+++ device.c 2012-07-15 19:41:08.000000000 +0200
@@ -179,7 +179,7 @@
#define AUTOCONF
#if defined(AUTOCONF)
-#include <linux/autoconf.h>
+#include <generated/autoconf.h>
#else
// #include <linux/config.h> //
http://forums.labjack.com/index.php?showtopic=4753 Labjack support
// // suggests that the config.h file is deprecated
@@ -190,7 +190,7 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
-#include <linux/smp_lock.h>
+//#include <linux/smp_lock.h>
#include <linux/completion.h>
#include <asm/uaccess.h>
#include <linux/usb.h>
@@ -346,7 +346,7 @@
static ssize_t read(struct file *file, char *buffer, size_t count, loff_t *ppos);
static ssize_t write(struct file *file, const char *buffer, size_t count,
loff_t *ppos);
-static int ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg);
+static long ioctl(struct file *file, unsigned int cmd, unsigned long arg);
static inline void delete(struct usb *dev);
static int open(struct inode *inode, struct file *file);
static int release(struct inode *inode, struct file *file);
@@ -360,13 +360,13 @@
static int probe (struct usb_interface *interface, const struct usb_device_id
*id);
static void disconnect (struct usb_interface *interface);
-static DECLARE_MUTEX (disconnect_sem);
+static DEFINE_SEMAPHORE (disconnect_sem);
static struct file_operations fops = {
owner: THIS_MODULE,
read: read,
write: write,
- ioctl: ioctl,
+ unlocked_ioctl: ioctl,
open: open,
release: release,
poll: poll,
@@ -840,7 +840,7 @@
// =[ ioctl() ]=========================================================
-static int ioctl (struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
+static long ioctl (struct file *file, unsigned int cmd, unsigned long arg)
{
struct usb *dev;
int retval = -ENOTTY; /* default: we don't understand ioctl */
@@ -971,7 +971,7 @@
goto exit;
}
- init_MUTEX (&dev->sem);
+ sema_init (&dev->sem, 1);
dev->udev = udev;
dev->open_count = 0;
But..... test it, i'll never do!!!
More information about the Voyage-linux
mailing list