Re: simple character device driver

2010-09-11 Thread fabio de francesco
On Friday 10 September 2010 21:07:44 John Mahoney wrote: On Fri, Sep 10, 2010 at 2:39 PM, John Mahoney jmaho...@waav.com wrote: On Fri, Sep 10, 2010 at 1:30 PM, fabio de francesco fa...@metanix.org wrote: On Friday 10 September 2010 19:16:31 John Mahoney wrote: On Fri, Sep 10, 2010 at 1:02

Re: simple character device driver

2010-09-11 Thread fabio de francesco
On Friday 10 September 2010 20:23:13 Josh Cartwright wrote: On Fri, Sep 10, 2010 at 05:51:41PM +0200, fabio de francesco wrote: static ssize_t mycdrv_read (struct file *file, char __user * buf, size_t lbuf, loff_t * ppos) { int nbytes, maxbytes, bytes_to_do; maxbytes =

Re: simple character device driver

2010-09-11 Thread fabio de francesco
On Saturday 11 September 2010 12:04:37 fabio de francesco wrote: On Friday 10 September 2010 20:23:13 Josh Cartwright wrote: On Fri, Sep 10, 2010 at 05:51:41PM +0200, fabio de francesco wrote: static ssize_t mycdrv_read (struct file *file, char __user * buf, size_t lbuf, loff_t * ppos)

Re: simple character device driver

2010-09-11 Thread fabio de francesco
On Saturday 11 September 2010 12:04:37 fabio de francesco wrote: On Friday 10 September 2010 20:23:13 Josh Cartwright wrote: On Fri, Sep 10, 2010 at 05:51:41PM +0200, fabio de francesco wrote: static ssize_t mycdrv_read (struct file *file, char __user * buf, size_t lbuf, loff_t * ppos)

Re: make with argument 0 is failing some where

2010-09-11 Thread Edward Allcutt
On Sat, 11 Sep 2010, Tapas Mishra wrote: I cloned the 2.6 latest kernel tree on my system and in my home directory made a folder named btc git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6 then compiled as yes ' ' | make 0=$HOME/btc/ oldconfig worked

Cairo cross compile

2010-09-11 Thread Giriprasad Deviprasad
Hi All,  I am trying to cross compile GTK+ in hawkboard (www.hawkboard.org). I have already cross compiled the following successfully for hawkboard: atk  fontconfig  freetype  glib  libxml2  pixman Now when I try to cross compile cairo, configure gives the following error: configure: error:

Re: make with argument 0 is failing some where

2010-09-11 Thread Tapas Mishra
On Sat, Sep 11, 2010 at 4:21 PM, Edward Allcutt edw...@allcutt.me.uk wrote: sudo make 0=$HOME/btc modules_install ln: target `kernel+/source' is not a directory make: *** [_modinst_] Error 1 Did I do some thing wrong? I think what you wanted was an O (capital o) not a 0 (zero). -- Yes

question about linked list implementation in kernel.h

2010-09-11 Thread Bond
I read I was going through include/linux/kernel.h encountered following code #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)-member ) *__mptr = (ptr);\ in above code I am not clear with (type *)0 how is it working any link?

Re: question about linked list implementation in kernel.h

2010-09-11 Thread Carlo Caione
On 11/09/2010 14:33, Bond wrote: I read I was going through include/linux/kernel.h encountered following code #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)-member ) *__mptr = (ptr);\ in above code I am not clear with (type *)0 how is

Re: question about linked list implementation in kernel.h

2010-09-11 Thread Bond
On Sat, Sep 11, 2010 at 6:22 PM, Carlo Caione carlo.cai...@gmail.comwrote: First link on google: Its not that I had not searched it did search but I had searched typedef and type and I kept reading links related to that only. What to be searched is not that obvious when some one is not clear.

Re: question about linked list implementation in kernel.h

2010-09-11 Thread Bond
On Sat, Sep 11, 2010 at 6:22 PM, Carlo Caione carlo.cai...@gmail.comwrote: http://www.kroah.com/log/linux/container_of.html I am not able to understand a single bit of the explanaition on the above link. They have assumed I programmed PCI buses which I have not.

Re: question about linked list implementation in kernel.h

2010-09-11 Thread Robert P. J. Day
On Sat, 11 Sep 2010, Bond wrote: On Sat, Sep 11, 2010 at 6:22 PM, Carlo Caione carlo.cai...@gmail.com wrote: http://www.kroah.com/log/linux/container_of.html I am not able to understand a single bit of the explanaition on the above link. They have assumed I programmed PCI buses which  I

usb driver binding to the device

2010-09-11 Thread Bond
Hi, I was going through a tutorial given here http://www.kroah.com/linux/talks/ols_2005_driver_tutorial/mgp00010.html I could not understand what did it means to bind to device as it is shown in this function on above link.

Re: question about linked list implementation in kernel.h

2010-09-11 Thread Manohar Vanga
I just made a small example (with comments) to play around with :-) Let me know if you feel something is wrong in my explanations (I'm still learning as well!) Hope it helps! On Sat, Sep 11, 2010 at 6:03 PM, Bond jamesbond.2...@gmail.com wrote: I read I was going through include/linux/kernel.h

Re: Cairo cross compile

2010-09-11 Thread DG
On Sat, Sep 11, 2010 at 5:08 AM, Giriprasad Deviprasad g_p...@yahoo.inwrote: Hi All, I am trying to cross compile GTK+ in hawkboard (www.hawkboard.org). I have already cross compiled the following successfully for hawkboard: atk fontconfig freetype glib libxml2 pixman Now when I try

Re: question about linked list implementation in kernel.h

2010-09-11 Thread Bond
On Sat, Sep 11, 2010 at 9:12 PM, Bond jamesbond.2...@gmail.com wrote: http://crashcourse.ca/introduction-linux-kernel-programming/intermission-lets-talk-about-linked-lists-and-containerof-free Robert (type *)( (char *)__mptr - offsetof(type,member) );}) there a subtraction has been

Re: question about linked list implementation in kernel.h

2010-09-11 Thread Carlo Caione
On 11/09/2010 17:45, Manohar Vanga wrote: I just made a small example (with comments) to play around with :-) Let me know if you feel something is wrong in my explanations (I'm still learning as well!) Hope it helps! It is correct. Good explanation. -- Carlo -- To unsubscribe from this list:

Re: question about linked list implementation in kernel.h

2010-09-11 Thread Bond
On Sat, Sep 11, 2010 at 9:15 PM, Manohar Vanga manohar.va...@gmail.comwrote: I just made a small example (with comments) to play around with :-) Let me know if you feel something is wrong in my explanations (I'm still learning as well!) Hope it helps! Manohar I just happen to understand

Re: question about linked list implementation in kernel.h

2010-09-11 Thread Manish Katiyar
On Sat, Sep 11, 2010 at 5:33 AM, Bond jamesbond.2...@gmail.com wrote: I read I was going through include/linux/kernel.h encountered following code #define container_of(ptr, type, member) ({  \     const typeof( ((type *)0)-member ) *__mptr = (ptr);    \ in above

Re: make with argument 0 is failing some where

2010-09-11 Thread Mulyadi Santosa
On Sat, Sep 11, 2010 at 19:28, Tapas Mishra mightydre...@gmail.com wrote: I think what you wanted was an O (capital o) not a 0 (zero). -- Yes even I also did the same. maybe you miss something..ok, please try sudo sh -c make your options here -- regards, Mulyadi Santosa Freelance Linux

IRQ_NONE or IRQ_HANDLED

2010-09-11 Thread fabio de francesco
Hi all, For exercise purposes I have coded a device driver that shares an IRQ line with other devices. In the code from the book I am reading (Cooperstein's), the interrupt handler returns IRQ_NONE. Close to that code there's the comment We're just observing. What I don't understand is why

Re: usb driver binding to the device

2010-09-11 Thread Josh Cartwright
On Sat, Sep 11, 2010 at 09:15:12PM +0530, Bond wrote: Hi, I was going through a tutorial given here http://www.kroah.com/linux/talks/ols_2005_driver_tutorial/mgp00010.html I could not understand what did it means to bind to device as it is shown in this function on above link. To 'bind' to

difference between read permission and executing permission

2010-09-11 Thread Parmenides
Hi, For a specified directory, we can go through it when the kernel parsing path, though we can not read it. Actually, parsing path also need read the directory file. So, how does the kernel distinguish between these two permission? -- To unsubscribe from this list: send an email with

Re: IRQ_NONE or IRQ_HANDLED

2010-09-11 Thread Josh Cartwright
On Sat, Sep 11, 2010 at 07:50:43PM +0200, fabio de francesco wrote: Hi all, For exercise purposes I have coded a device driver that shares an IRQ line with other devices. In the code from the book I am reading (Cooperstein's), the interrupt handler returns IRQ_NONE. Close to that code

Re: difference between read permission and executing permission

2010-09-11 Thread Mulyadi Santosa
On Sun, Sep 12, 2010 at 00:28, Parmenides mobile.parmeni...@gmail.com wrote: Hi,   For a specified directory, we can go through it when the kernel parsing path, though we can not read it. Actually, parsing path also need read the directory file. So, how does the kernel distinguish between

Re: difference between read permission and executing permission

2010-09-11 Thread mohit verma
mulyadi, i am not poking at you. but i think if we go through namei.c file as i said ,things will be clear.

Re: make with argument 0 is failing some where

2010-09-11 Thread Tapas Mishra
On Sat, Sep 11, 2010 at 10:57 PM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: maybe you miss something..ok, please try sudo sh -c make your options here I did what you suggested I am getting an error to always run make mrproper where as I have executed make mrproper in two ways 1) make