ElGuido n00b
Joined: 24 Apr 2003 Posts: 74
|
Posted: Mon Feb 12, 2007 7:23 pm Post subject: lirc 0.8.1 / mceusb2 / kernel 2.6.20+ FYI |
|
|
In case anyone else was getting difficulties with lirc and the mceusb2 controller and kernel 2.6.20 I have finally found a solution so that lirc will compile
Check out
http://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg116981.html for the mceusb2 patch
Using this will remove all the SLAB_ATOMIC errors which prevented compilation
I did the following:
Code: |
ebuild /usr/portage/app-misc/lirc/lirc-0.8.1.ebuild fetch
ebuild /usr/portage/app-misc/lirc/lirc-0.8.1.ebuild unpack
cd /var/tmp/portage/app-misc/lirc-0.8.1/work/lirc-0.8.1/drivers/ |
Then being a bit short in the head about patching, I applied the patch by hand.
It seems to me that it just replaces any occurrence of SLAB_ with GFP_
So fire up your editor/patch commands and modify
then finish off with
Code: |
ebuild /usr/portage/app-misc/lirc/lirc-0.8.1.ebuild compile
ebuild /usr/portage/app-misc/lirc/lirc-0.8.1.ebuild install
ebuild /usr/portage/app-misc/lirc/lirc-0.8.1.ebuild qmerge |
HTH anyone else in the same predicament
K Rgds,
G
Code: |
--- lirc-0.8.1.orig/drivers/lirc_mceusb2/lirc_mceusb2.c
+++ lirc-0.8.1/drivers/lirc_mceusb2/lirc_mceusb2.c
@@ -242,7 +242,7 @@ static void request_packet_async(struct
async_urb->transfer_buffer_length = size;
async_urb->dev = ir->usbdev;
- if ((res=usb_submit_urb(async_urb, SLAB_ATOMIC))) {
+ if ((res=usb_submit_urb(async_urb, GFP_ATOMIC))) {
dprintk(DRIVER_NAME "[%d]: receive request FAILED! (res=%d)\n",
ir->devnum, res);
return;
}
@@ -445,7 +445,7 @@ static void usb_remote_recv(struct urb *
}
/* resubmit urb */
- usb_submit_urb(urb, SLAB_ATOMIC);
+ usb_submit_urb(urb, GFP_ATOMIC);
}
@@ -681,7 +681,7 @@ static int usb_remote_probe(struct usb_i
mem_failure = 3;
} else if (lirc_buffer_init(rbuf, sizeof(lirc_t),
LIRCBUF_SIZE)) {
mem_failure = 4;
- } else if (!(ir->buf_in = usb_buffer_alloc(dev, maxp,
SLAB_ATOMIC, &ir->dma_in))) {
+ } else if (!(ir->buf_in = usb_buffer_alloc(dev, maxp,
GFP_ATOMIC, &ir->dma_in))) {
mem_failure = 5;
} else if (!(ir->urb_in = usb_alloc_urb(0, GFP_KERNEL))) {
mem_failure = 7;
Index: lirc-0.8.1/drivers/lirc_streamzap/lirc_streamzap.c |
|
|