[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <15f12ed247c7911619adb3445579ce13394a5ddd.1559696611.git.gneukum1@gmail.com>
Date: Wed, 5 Jun 2019 01:09:12 +0000
From: Geordan Neukum <gneukum1@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Geordan Neukum <gneukum1@...il.com>,
Mao Wenan <maowenan@...wei.com>,
Jeremy Sowden <jeremy@...zel.net>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 5/6] 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: Geordan Neukum <gneukum1@...il.com>
---
drivers/staging/kpc2000/kpc2000_spi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
index 07b0327d8bef..4f517afc6239 100644
--- a/drivers/staging/kpc2000/kpc2000_spi.c
+++ b/drivers/staging/kpc2000/kpc2000_spi.c
@@ -103,7 +103,6 @@ static struct spi_board_info p2kr0_board_info[] = {
struct kp_spi {
struct spi_master *master;
u64 __iomem *base;
- unsigned long phys;
struct device *dev;
};
@@ -462,9 +461,8 @@ kp_spi_probe(struct platform_device *pldev)
goto free_master;
}
- kpspi->phys = (unsigned long)devm_ioremap_nocache(&pldev->dev, r->start,
- resource_size(r));
- kpspi->base = (u64 __iomem *)kpspi->phys;
+ kpspi->base = devm_ioremap_nocache(&pldev->dev, r->start,
+ resource_size(r));
status = spi_register_master(master);
if (status < 0) {
--
2.21.0
Powered by blists - more mailing lists