Skip to contentSkip to conversation

PowerPC 4xx I2C driver - add

PATCH New Eugene Surovegin 2 participants 4 messages Oct 4, 2006 – Oct 6, 2006 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PowerPC 4xx I2C driver - add

This small patch adds calls to the functions request_mem_region and release_mem_region.

Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol at teamlog.com>
Signed-off-by: Eugene Surovegin <ebs at ebshome.net> -------------- next part --------------

drivers/i2c/busses/i2c-ibm_iic.c +9 -1
@@ -680,10 +680,16 @@
 	dev->idx = ocp->def->index;
 	ocp_set_drvdata(ocp, dev);
 	
+	if (!request_mem_region(ocp->def->paddr, sizeof(struct iic_regs), "ibm_iic")) {
+		ret = -EBUSY;
+		goto fail2;
+	}
+	
 	if (!(dev->vaddr = ioremap(ocp->def->paddr, sizeof(struct iic_regs)))){
 		printk(KERN_CRIT "ibm-iic%d: failed to ioremap device registers\n",
 			dev->idx);
-		ret = -ENXIO;
+		release_mem_region(ocp->def->paddr, sizeof(struct iic_regs));
+		ret = -ENOMEM;
 		goto fail2;
 	}
 	
@@ -749,6 +755,7 @@
 	}	
 
 	iounmap(dev->vaddr);
+	release_mem_region(ocp->def->paddr, sizeof(struct iic_regs));
 fail2:	
 	ocp_set_drvdata(ocp, NULL);
 	kfree(dev);	
@@ -777,6 +784,7 @@
 		    free_irq(dev->irq, dev);
 		}
 		iounmap(dev->vaddr);
+		release_mem_region(ocp->def->paddr, sizeof(struct iic_regs));
 		kfree(dev);
 	}
 }
#1 lore raw

PATCH 1/1 PowerPC 4xx I2C driver - add

Hi Eugene,

Wrong maintainer, and wrong list. I am the i2c maintainer, Greg is no longer, and there's a mailing list dedicated to i2c:
http://lists.lm-sensors.org/mailman/listinfo/i2c

Please resend to this list, thanks.

Quoted 2 lines

This small patch adds calls to the functions request_mem_region and release_mem_region.

That I can see by just reading the patch. A more useful description would be _why_ this is needed.

Signature · 1 line
Jean Delvare
#2 lore raw

PATCH 1/1 PowerPC 4xx I2C driver - add

In reply to Eugene Surovegin
Quoted 7 lines · Jean Delvare

Hi Eugene,

Wrong maintainer, and wrong list. I am the i2c maintainer, Greg is no longer, and there's a mailing list dedicated to i2c:
http://lists.lm-sensors.org/mailman/listinfo/i2c

Please resend to this list, thanks.

Oops, it was a long time since I sent any i2c patches. Frankly though, I don't understand your request to resend it to the other list as it seems it reached the right person anyway and patch is beyond trivial :).

Quoted 6 lines
Quoted 3 lines

This small patch adds calls to the functions request_mem_region and release_mem_region.

That I can see by just reading the patch. A more useful description would be _why_ this is needed.

Well, I let the author explain then.

Personally I don't care if this patch is accepted or not. Driver is working just fine without it.

Signature · 1 line
Eugene
#3 lore raw

PATCH 1/1 PowerPC 4xx I2C driver - add

In reply to Eugene Surovegin

Hi Eugene,

Quoted 7 lines · Jean Delvare
Quoted 6 lines

Hi Eugene,

Wrong maintainer, and wrong list. I am the i2c maintainer, Greg is no longer, and there's a mailing list dedicated to i2c:
http://lists.lm-sensors.org/mailman/listinfo/i2c

Quoted 6 lines
Quoted 1 line

Please resend to this list, thanks.

Oops, it was a long time since I sent any i2c patches. Frankly though, I don't understand your request to resend it to the other list as it seems it reached the right person anyway and patch is beyond trivial :).

Because I'd like the right audience to see it. I am short of review time and would appreciate if others could review the i2c patches from times to times. This only has a chance to work if the patches are submitted to the right list.

I see that Jean-Baptiste resbumitted the patch to the i2c list already, thanks.

Quoted 2 lines

Personally I don't care if this patch is accepted or not. Driver is working just fine without it.

What I really want to know is whether it still works with it.

Signature · 1 line
Jean Delvare