summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/rsmu_spi.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2023-03-13 11:58:33 +0100
committerLee Jones <lee@kernel.org>2023-04-26 12:40:32 +0200
commite90978ecdf9d016e31f6aff36da77255b42fb4fd (patch)
tree5d2b653fb182e14113ffd99074ca75f6c305e215 /drivers/mfd/rsmu_spi.c
parentmfd: atc260x-i2c: Drop of_match_ptr for ID table (diff)
downloadlinux-e90978ecdf9d016e31f6aff36da77255b42fb4fd.tar.xz
linux-e90978ecdf9d016e31f6aff36da77255b42fb4fd.zip
mfd: rsmu_spi: Remove unneeded casts of void *
There is no need to cast a "void *" to a different type of pointer. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/ae84c1751e79cb49ab584557f4ecd835a8493d7c.1678704562.git.geert+renesas@glider.be
Diffstat (limited to '')
-rw-r--r--drivers/mfd/rsmu_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/rsmu_spi.c b/drivers/mfd/rsmu_spi.c
index d2f3d8f1e05a..2428aaa9aaed 100644
--- a/drivers/mfd/rsmu_spi.c
+++ b/drivers/mfd/rsmu_spi.c
@@ -129,7 +129,7 @@ static int rsmu_write_page_register(struct rsmu_ddata *rsmu, u16 reg)
static int rsmu_reg_read(void *context, unsigned int reg, unsigned int *val)
{
- struct rsmu_ddata *rsmu = spi_get_drvdata((struct spi_device *)context);
+ struct rsmu_ddata *rsmu = spi_get_drvdata(context);
u8 addr = (u8)(reg & RSMU_LOWER_ADDR_MASK);
int err;
@@ -146,7 +146,7 @@ static int rsmu_reg_read(void *context, unsigned int reg, unsigned int *val)
static int rsmu_reg_write(void *context, unsigned int reg, unsigned int val)
{
- struct rsmu_ddata *rsmu = spi_get_drvdata((struct spi_device *)context);
+ struct rsmu_ddata *rsmu = spi_get_drvdata(context);
u8 addr = (u8)(reg & RSMU_LOWER_ADDR_MASK);
u8 data = (u8)val;
int err;