diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-nomadik.c')
-rw-r--r-- | drivers/i2c/busses/i2c-nomadik.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index a4f8d33fa389..170dbd70b934 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c | |||
@@ -914,6 +914,7 @@ static int __devinit nmk_i2c_probe(struct platform_device *pdev) | |||
914 | 914 | ||
915 | static int __devexit nmk_i2c_remove(struct platform_device *pdev) | 915 | static int __devexit nmk_i2c_remove(struct platform_device *pdev) |
916 | { | 916 | { |
917 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
917 | struct nmk_i2c_dev *dev = platform_get_drvdata(pdev); | 918 | struct nmk_i2c_dev *dev = platform_get_drvdata(pdev); |
918 | 919 | ||
919 | i2c_del_adapter(&dev->adap); | 920 | i2c_del_adapter(&dev->adap); |
@@ -924,6 +925,8 @@ static int __devexit nmk_i2c_remove(struct platform_device *pdev) | |||
924 | i2c_clr_bit(dev->virtbase + I2C_CR, I2C_CR_PE); | 925 | i2c_clr_bit(dev->virtbase + I2C_CR, I2C_CR_PE); |
925 | free_irq(dev->irq, dev); | 926 | free_irq(dev->irq, dev); |
926 | iounmap(dev->virtbase); | 927 | iounmap(dev->virtbase); |
928 | if (res) | ||
929 | release_mem_region(res->start, resource_size(res)); | ||
927 | clk_disable(dev->clk); | 930 | clk_disable(dev->clk); |
928 | clk_put(dev->clk); | 931 | clk_put(dev->clk); |
929 | platform_set_drvdata(pdev, NULL); | 932 | platform_set_drvdata(pdev, NULL); |