Skip to contentSkip to conversation

matroxfb: simply return what i2c_add_driver() does

PATCH In review Arthur Othieno 2 participants 3 messages Feb 11, 2006 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 matroxfb: simply return what i2c_add_driver() does

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.

---

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

drivers/video/matrox/matroxfb_maven.c +5 -12
index 6019710..531a0c3 100644
@@ -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);
 }
 
Signature · 1 line
1.1.5
Acked-by on v1 1/1
#1 lore raw

Hi Arthur,

Quoted 7 lines

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.

Arthur, do you have such a device yourself? I have another cleanup patch for this driver and am looking for testers.

Thanks,

Signature · 1 line
Jean Delvare
#2 lore raw
Quoted 6 lines · Jean Delvare

Hi Arthur,

Quoted 4 lines

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.

Quoted 8 lines
Quoted 3 lines

Add __init/__exit annotations while we're at it.

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..