* [PATCH] matroxfb: simply return what i2c_add_driver() does
@ 2005-12-20 3:25 Arthur Othieno
0 siblings, 0 replies; 4+ messages in thread
From: Arthur Othieno @ 2005-12-20 3:25 UTC (permalink / raw)
To: akpm; +Cc: vandrove, linux-kernel
`insmod' will tell us when the module failed to load. We do no further
processing on the return from i2c_add_driver(), so just return that
instead of storing it.
Add __init/__exit annotations while we're at it.
Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
---
drivers/video/matrox/matroxfb_maven.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
5599955f4f42ebfd5b244563f2be24f9e60fe186
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c
index ad60bbb..d5275c7 100644
--- a/drivers/video/matrox/matroxfb_maven.c
+++ b/drivers/video/matrox/matroxfb_maven.c
@@ -1302,20 +1302,13 @@ static struct i2c_driver maven_driver={
.command = maven_command,
};
-/* ************************** */
-
-static int matroxfb_maven_init(void) {
- int err;
-
- err = i2c_add_driver(&maven_driver);
- if (err) {
- printk(KERN_ERR "maven: Maven driver failed to register (%d).\n", err);
- return err;
- }
- return 0;
+static int __init matroxfb_maven_init(void)
+{
+ return i2c_add_driver(&maven_driver);
}
-static void matroxfb_maven_exit(void) {
+static void __exit matroxfb_maven_exit(void)
+{
i2c_del_driver(&maven_driver);
}
--
0.99.9n
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] matroxfb: simply return what i2c_add_driver() does
@ 2006-02-11 11:00 Arthur Othieno
2006-02-11 13:53 ` Jean Delvare
0 siblings, 1 reply; 4+ messages in thread
From: Arthur Othieno @ 2006-02-11 11:00 UTC (permalink / raw)
To: akpm; +Cc: Arthur Othieno, vandrove, linux-kernel
insmod will tell us when the module failed to load. We do no further
processing on the return from i2c_add_driver(), so just return what
i2c_add_driver() did, instead of storing it.
Add __init/__exit annotations while we're at it.
Signed-off-by: Arthur Othieno <apgo@patchbomb.org>
---
Andrew, originally sent 12/19/05. No notification from mm-commits of
patch being accepted/dropped. Assuming it got lost along the way? ;-)
drivers/video/matrox/matroxfb_maven.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
3d7e2f6d53ac04029f02e1ce7b966f3521617447
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c
index 6019710..531a0c3 100644
--- a/drivers/video/matrox/matroxfb_maven.c
+++ b/drivers/video/matrox/matroxfb_maven.c
@@ -1297,20 +1297,13 @@ static struct i2c_driver maven_driver={
.detach_client = maven_detach_client,
};
-/* ************************** */
-
-static int matroxfb_maven_init(void) {
- int err;
-
- err = i2c_add_driver(&maven_driver);
- if (err) {
- printk(KERN_ERR "maven: Maven driver failed to register (%d).\n", err);
- return err;
- }
- return 0;
+static int __init matroxfb_maven_init(void)
+{
+ return i2c_add_driver(&maven_driver);
}
-static void matroxfb_maven_exit(void) {
+static void __exit matroxfb_maven_exit(void)
+{
i2c_del_driver(&maven_driver);
}
--
1.1.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] matroxfb: simply return what i2c_add_driver() does
2006-02-11 11:00 [PATCH] matroxfb: simply return what i2c_add_driver() does Arthur Othieno
@ 2006-02-11 13:53 ` Jean Delvare
2006-02-11 14:39 ` Arthur Othieno
0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2006-02-11 13:53 UTC (permalink / raw)
To: Arthur Othieno; +Cc: Andrew Morton, Petr Vandrovec, linux-kernel
Hi Arthur,
> insmod will tell us when the module failed to load. We do no further
> processing on the return from i2c_add_driver(), so just return what
> i2c_add_driver() did, instead of storing it.
>
> Add __init/__exit annotations while we're at it.
>
> Signed-off-by: Arthur Othieno <apgo@patchbomb.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Arthur, do you have such a device yourself? I have another cleanup
patch for this driver and am looking for testers.
Thanks,
--
Jean Delvare
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] matroxfb: simply return what i2c_add_driver() does
2006-02-11 13:53 ` Jean Delvare
@ 2006-02-11 14:39 ` Arthur Othieno
0 siblings, 0 replies; 4+ messages in thread
From: Arthur Othieno @ 2006-02-11 14:39 UTC (permalink / raw)
To: Jean Delvare; +Cc: Arthur Othieno, Andrew Morton, Petr Vandrovec, linux-kernel
On Sat, Feb 11, 2006 at 02:53:22PM +0100, Jean Delvare wrote:
> Hi Arthur,
>
> > insmod will tell us when the module failed to load. We do no further
> > processing on the return from i2c_add_driver(), so just return what
> > i2c_add_driver() did, instead of storing it.
> >
> > Add __init/__exit annotations while we're at it.
> >
> > Signed-off-by: Arthur Othieno <apgo@patchbomb.org>
>
> Acked-by: Jean Delvare <khali@linux-fr.org>
>
> Arthur, do you have such a device yourself? I have another cleanup
> patch for this driver and am looking for testers.
Unfortunately not ;( This was the last of i2c_add_driver() return audit
I had sitting around. I'm sure someone with said device will speak up..
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-02-11 14:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-11 11:00 [PATCH] matroxfb: simply return what i2c_add_driver() does Arthur Othieno
2006-02-11 13:53 ` Jean Delvare
2006-02-11 14:39 ` Arthur Othieno
-- strict thread matches above, loose matches on Subject: below --
2005-12-20 3:25 Arthur Othieno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).