From: Mike Frysinger <vapier.adi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Dmitry Torokhov
<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Michael Hennerich
<michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>,
Luotao Fu <l.fu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Barry Song <barry.song-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org,
Chris Verges
<chrisv-TDbMi1wZJFNf2ZY+IB7+a9BPR1lH4CV8@public.gmane.org>
Subject: Re: [PATCH v2] input/misc: new ADXL345/346 driver
Date: Fri, 16 Oct 2009 01:39:49 -0400 [thread overview]
Message-ID: <8bd0f97a0910152239v3c889a95rd9b100e3e7204e98@mail.gmail.com> (raw)
In-Reply-To: <20091016043627.GC11582-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
On Fri, Oct 16, 2009 at 00:36, Dmitry Torokhov wrote:
> On Wed, Oct 14, 2009 at 06:54:40AM -0400, Mike Frysinger wrote:
>> +/* Stub functions so we can load/unload the module */
>> +static __init int adxl34x_init(void)
>> +{
>> + return 0;
>> +}
>> +module_init(adxl34x_init);
>> +
>> +static __exit void adxl34x_exit(void)
>> +{
>> +}
>> +module_exit(adxl34x_exit);
>
> Huh?
>
> [root@dtor-d630 ~]# modprobe input_polldev
> [root@dtor-d630 ~]# lsmod | grep input
> input_polldev 2996 0
> uinput 7353 0
> [root@dtor-d630 ~]# rmmod input_polldev
> [root@dtor-d630 ~]# lsmod | grep input
> uinput 7353 0
> [root@dtor-d630 ~]# grep -c module_exit ~dtor/kernel/work/drivers/input/input-polldev.c
> 0
> [root@dtor-d630 ~]#
your output doesnt tell the whole story. the trick is that if you
declare a module_init() but no module_exit(), the kernel wont let you
unload it. i thought it was a matter of no module_exit(), not an
unbalanced pair.
i'll send an updated ad714x driver too since it does the same thing.
>> +struct device;
>> +struct adxl34x;
>> +typedef int (adxl34x_read_t) (struct device *, unsigned char);
>> +typedef int (adxl34x_read_block_t) (struct device *, unsigned char, int, unsigned char *);
>> +typedef int (adxl34x_write_t) (struct device *, unsigned char, unsigned char);
>> +
>> +void adxl34x_disable(struct adxl34x *ac);
>> +void adxl34x_enable(struct adxl34x *ac);
>> +int adxl34x_probe(struct adxl34x **pac, struct device *dev, u16 bus_type,
>> + int irq, int fifo_delay_default, adxl34x_read_t read,
>> + adxl34x_read_block_t read_block, adxl34x_write_t write);
>
> Too many arguments... I think creating "struct adxl34x_ops" is called
> for.
guess i should do the same with the ad714x driver ?
>> --- /dev/null
>> +++ b/include/linux/input/adxl34x.h
>
> Tabs & spaces.
i went through all of the driver code but i guess i forgot to check the header
> Put this in your .vimrc:
well, none of us use vim, so doesnt really matter ;)
-mike
_______________________________________________
Uclinux-dist-devel mailing list
Uclinux-dist-devel@blackfin.uclinux.org
https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel
next prev parent reply other threads:[~2009-10-16 5:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 10:27 [PATCH] input/misc: new ADXL345/346 driver Mike Frysinger
[not found] ` <1255516029-30023-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2009-10-14 10:54 ` [PATCH v2] " Mike Frysinger
2009-10-16 4:36 ` Dmitry Torokhov
[not found] ` <20091016043627.GC11582-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2009-10-16 5:39 ` Mike Frysinger [this message]
[not found] ` <8bd0f97a0910152239v3c889a95rd9b100e3e7204e98-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-16 5:44 ` Dmitry Torokhov
[not found] ` <20091016054414.GE11582-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2009-10-16 5:53 ` Mike Frysinger
2009-10-16 6:57 ` [Uclinux-dist-devel] " Mike Frysinger
2009-10-16 7:22 ` Dmitry Torokhov
[not found] ` <20091016072216.GH11582-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2009-10-16 8:20 ` Mike Frysinger
2009-10-16 9:06 ` Hennerich, Michael
2009-10-20 8:40 ` [PATCH v3] " Mike Frysinger
2009-10-20 18:46 ` Chris Verges
2009-10-21 2:32 ` [Uclinux-dist-devel] " Mike Frysinger
2010-06-25 7:14 ` Dmitry Torokhov
[not found] ` <20100625071425.GA631-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2010-06-25 13:59 ` Hennerich, Michael
2010-07-01 7:53 ` Dmitry Torokhov
2010-07-01 9:15 ` Hennerich, Michael
2010-07-01 16:08 ` Dmitry Torokhov
2010-07-21 13:50 ` [Uclinux-dist-devel] " Mike Frysinger
2010-07-23 6:44 ` Dmitry Torokhov
2010-08-05 12:30 ` Hennerich, Michael
2010-08-06 5:37 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8bd0f97a0910152239v3c889a95rd9b100e3e7204e98@mail.gmail.com \
--to=vapier.adi-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=barry.song-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
--cc=chrisv-TDbMi1wZJFNf2ZY+IB7+a9BPR1lH4CV8@public.gmane.org \
--cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=l.fu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
--cc=uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.