Skip to content

Commit

Permalink
ARM: PNX4008: Make ioaddr 'void __iomem *' rather than 'u32'
Browse files Browse the repository at this point in the history
This avoids unnecessary casting.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Feb 12, 2010
1 parent 2781681 commit 88d968b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions drivers/i2c/busses/i2c-pnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -671,7 +671,7 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev)
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:
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion include/linux/i2c-pnx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 88d968b

Please sign in to comment.