/* Release the device and return 0 if there is one.  */
static int __devexit pmcmsptwi_remove(struct platform_device *pldev)
/* Release the device and return 0 if there is one.  */
static int __devexit pmcmsptwi_remove(struct platform_device *pldev)
{
	struct resource *res;
	i2c_del_adapter(&pmcmsptwi_adapter);
	platform_set_drvdata(pldev, NULL);
	if (pmcmsptwi_data.irq) {
		pmcmsptwi_writel(0,
			pmcmsptwi_data.iobase + MSP_TWI_INT_MSK_REG_OFFSET);
		free_irq(pmcmsptwi_data.irq, &pmcmsptwi_data);
	}
	iounmap(pmcmsptwi_data.iobase);
	res = platform_get_resource(pldev, IORESOURCE_MEM, 0);
	release_mem_region(res->start, resource_size(res));
	return 0;
}