On 11/06/07, Christian Stalp <christian.stalp@xxxxxx> wrote:
Hello again, I have another problem with my driver. This time it is the request_irq-call. I got this code, where there is a linked list: LIST_HEAD(me1400_info_list); then later this list is used to fill my structs inside the open-function: struct list_head *ptr; me1400_info_type *info = NULL; for(ptr = me1400_info_list.next, i = 0; ptr != &me1400_info_list; ptr = ptr->next, i++) { info = list_entry(ptr, me1400_info_type, list); if(i == minor) break; } with that this struct is used (casted to void) to initiade the request_irq-call: err = request_irq(info->int_line, me1400_isr, SA_INTERRUPT | SA_SHIRQ, ME1400_NAME, (void *) info); The problem now is, that I get this warning: /home/chris/tmp/me1400-1.2.12/me1400.c: In function 'me1400_open': /home/chris/tmp/me1400-1.2.12/me1400.c:672: warning: passing argument 2 of 'request_irq' from incompatible pointer type
This is request_irq : int request_irq(unsigned int irq, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id) See that second argument? it needs a 'irq_handler_t' as its second argument. You are passing it a 'me1400_info_type *' as the second argument. So, just like the compiler tells you; you are "passing argument 2 of 'request_irq' from incompatible pointer type". -- Jesper Juhl <jesper.juhl@xxxxxxxxx> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ