ARM: PNX4008: Make ioaddr 'void __iomem *' rather than 'u32'
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 21 Nov 2009 11:58:36 +0000 (11:58 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 12 Feb 2010 17:32:40 +0000 (17:32 +0000)
This avoids unnecessary casting.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/i2c/busses/i2c-pnx.c
include/linux/i2c-pnx.h

index bfcd079e885cb91755444a4e4bd35e2b67094690..882579e641116c5e4f019909d989fb0a81a67582 100644 (file)
@@ -612,8 +612,8 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev)
                goto out_clkget;
        }
 
-       if (!(alg_data->ioaddr =
-                       (u32)ioremap(alg_data->base, I2C_PNX_REGION_SIZE))) {
+       alg_data->ioaddr = ioremap(alg_data->base, I2C_PNX_REGION_SIZE);
+       if (!alg_data->ioaddr) {
                dev_err(&pdev->dev, "Couldn't ioremap I2C I/O region\n");
                ret = -ENOMEM;
                goto out_release;
@@ -671,7 +671,7 @@ out_irq:
 out_clock:
        clk_disable(alg_data->clk);
 out_unmap:
-       iounmap((void *)alg_data->ioaddr);
+       iounmap(alg_data->ioaddr);
 out_release:
        release_mem_region(alg_data->base, I2C_PNX_REGION_SIZE);
 out_clkget:
@@ -691,7 +691,7 @@ static int __devexit i2c_pnx_remove(struct platform_device *pdev)
        free_irq(alg_data->irq, i2c_pnx->adapter);
        i2c_del_adapter(adap);
        clk_disable(alg_data->clk);
-       iounmap((void *)alg_data->ioaddr);
+       iounmap(alg_data->ioaddr);
        release_mem_region(alg_data->base, I2C_PNX_REGION_SIZE);
        clk_put(alg_data->clk);
        platform_set_drvdata(pdev, NULL);
index 9035711cb3b1868a676f0b782b9826b4ab9e7f91..5a48f33046fb133c19253f3284ed63ce064903ba 100644 (file)
@@ -26,7 +26,7 @@ struct i2c_pnx_mif {
 
 struct i2c_pnx_algo_data {
        u32                     base;
-       u32                     ioaddr;
+       void __iomem            *ioaddr;
        int                     irq;
        struct i2c_pnx_mif      mif;
        int                     last;