Commit fbf476ea authored by Geordan Neukum's avatar Geordan Neukum Committed by Greg Kroah-Hartman

staging: kpc2000: kpc_spi: remove unnecessary ulong repr of i/o addr

The kpc_spi driver stashes off an unsigned long representation of the
i/o mapping returned by devm_ioremap_nocache(). This is unnecessary, as
the only use of the unsigned long repr is to eventually be re-cast to
an (u64 __iomem *). Instead of casting the (void __iomem *) to an
(unsigned long) then a (u64 __iomem *), just remove this intermediate
step. As this intermediary is no longer used, also remove it from its
structure.
Signed-off-by: default avatarGeordan Neukum <gneukum1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 77a91f4b
...@@ -103,7 +103,6 @@ static struct spi_board_info p2kr0_board_info[] = { ...@@ -103,7 +103,6 @@ static struct spi_board_info p2kr0_board_info[] = {
struct kp_spi { struct kp_spi {
struct spi_master *master; struct spi_master *master;
u64 __iomem *base; u64 __iomem *base;
unsigned long phys;
struct device *dev; struct device *dev;
}; };
...@@ -462,9 +461,8 @@ kp_spi_probe(struct platform_device *pldev) ...@@ -462,9 +461,8 @@ kp_spi_probe(struct platform_device *pldev)
goto free_master; goto free_master;
} }
kpspi->phys = (unsigned long)devm_ioremap_nocache(&pldev->dev, r->start, kpspi->base = devm_ioremap_nocache(&pldev->dev, r->start,
resource_size(r)); resource_size(r));
kpspi->base = (u64 __iomem *)kpspi->phys;
status = spi_register_master(master); status = spi_register_master(master);
if (status < 0) { if (status < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment